# Bar Plots

Bar plots present the numeric values of categorical data with the data values of each series represented as a horizontal bar. Sequential data values are considered to belong to different categories and are plotted along the vertical axis at equally spaced intervals. The data values from different series are assigned to these categories based on the position of the value in the series, for example, the second data value taken from each series all share one category. The data values are plotted along the horizontal (X) axis as bars of different lengths and positions depending on the numeric content of the data value and the particular sub-type chosen for the bar plot.

Bar plot sub-types provide three options for relating the values from different data series. The first sub-type plots each series independently in adjacent bars, each of which is tied to the vertical axis and has its length determined by the numeric content of the data value. The second sub-type plots each series as a horizontally stacked set of bars with the horizontal length of each element determined by the numeric content of the data value and the position of the bar determined by the position of the element in the data series. For example, if the first series starts with values {3.9, 4.2, ...}, the second series with values {1.2, 3.5, ...}, and the third series with values {3.1, 1.9, ...}, then the third bar will be plotted ranging from 7.7 to 9.6, since 7.7=4.2+3.5 and 9.6=4.2+3.5+1.9. The third sub-type plots each series as a horizontally stacked set of bars scaled to the total all the numeric values in that category. Using the example above, the three bars would range from 0 to 0.4375, from 0.4375 to 0.8020, and from 0.8020 to 1 respectively because the intervals are the proportional contribution of each data value to the total, i.e. 0.4375=4.2/(4.2+3.5+1.9) for the first, 0.3645...=3.5/(4.2+3.5+1.9) for the second, and 0.1979...=1.9/(4.2+3.5+1.9) for the third. By default, these numbers are presented as percentages on the horizontal (X) axis.

Bar plots do not have any pre-defined styles.

Figure 10-5An example of bar plots

This screenshot shows a table of data and three bar plots. The data consist of three series organized by row and starting with the words "Widgets", "Gadgets", and "Lumpets". Each of these series has values in five categories. The three graphs illustrate the three sub-types of bar plots, with the series plotted independently in the left plot, stacked in the middle plot, and proportionately stacked in the right plot.

Each series in bar plots can include three main elements and two error elements, although only the value element is necessary. The series can have a 'Name' element, which is a single text entry used to identify the series, must have a 'Values' element, which is a sequence of numeric values, and may have a 'Label' element, which is a sequence of text entries used to identify the categories. All of these elements can be defined as references to a region of the worksheet, as literally defined entries, or as formula expressions which result in the correct type. The 'Label' element is shared by all of the series. The legend added to a bar plot identifies the different series, by default using the entries of the 'Name' element of each series. The two error elements include a list for errors in the positive direction and one for errors in the negative direction.

Table 10-2The data in each bar plot series
Element Type Example
Name A single textual element labeling the data series. These will be used in the legend which may be displayed with the bar plot. {"Widgets"}
Value A series of numeric values. {1293, 2502, 3297, 1100, 2487}
Label A series of textual elements labeling each value. Generally, this series will have as many entries as there were in the "Value" series. These entries are shared by all the series in the bar plot. {"North", "South", "Central", "East", "West"}
Error (+) A list of numeric values with as many elements as there were in the 'Value' list. These values can be in the same units as the numeric values in the 'Value' list, can be proportions or can be proportions multiplied by one hundred. {0.10, 0.12, 0.09, 0.11, 0.09}
Error (-) A list of numeric values with as many elements as there were in the 'Value' list. These values can be in the same units as the numeric values in the 'Value' list, can be proportions or can be proportions multiplied by one hundred. {0.08, 0.11, 0.10, 0.09, 0.11}

Bar plots provide three icons to choose one of the three bar plot sub-types.

Bar plot sub-type and style options.

The icon for a bar plot of the sub-type with independent, adjacent bars.

The icon for a bar plot of the sub-type with horizontally stacked bars.

The icon for a bar plot of the sub-type with horizontally stacked, proportionately scaled bars.