This section describes the terms used to refer to the different kinds of information that can be plotted. The various types of charts and graphs are also defined.
Data that are related by a common idea or purpose constitute a “series.” For example, the prices of a futures commodity over the course of a year form a single series of data. The volume forms a second data series.
When you include several series in one chart, characteristics such as color and pattern can help distinguish one from another. You can more readily differentiate series on a color monitor than you can on a monochrome monitor. The number of series that can appear on the same chart depends on the chart type and the number of available colors.
“Categories” are nonnumeric data. A set of categories forms a frame of reference for the comparison of numeric data. For example, the months of the year are categories against which numeric data such as inches of rainfall can be plotted.
Regional sales provide another example. A chart can compare a company's sales in different parts of the country. Each region forms a category.
“Values” are numeric data. Sales, stock prices, air temperatures, and populations are all series of values that can be plotted against categories or against other values.
Presentation graphics allows you to overlay different series of value data on a single graph. For example, average monthly temperatures or monthly sales of heating oil during different years—or a combination of temperatures and sales—can be plotted together on the same graph.
“Pie charts” are used to represent data by showing the relationship of each part to the whole. A good example is a company's annual budget. A pie chart allows you to view each area of revenue or spending by its relative size within the context of the entire company budget.
Presentation graphics can display either a standard or an “exploded” pie chart. The exploded view shows the pie with one or more pieces separated for emphasis. You can label each slice of a pie chart with a percentage figure if you wish.
As the name implies, a “bar chart” shows data as horizontal bars. Bar charts show comparisons among items rather than absolute value.
“Column charts” are vertical bar charts. Column charts are frequently used to show variations over a period of time, since they suggest time flow better than a bar chart.
“Line graphs” illustrate trends or changes in data. They show how a series of values varies against a particular category—for example, average temperatures throughout one year.
Traditionally, line graphs show a collection of data points connected by lines. Presentation graphics can also plot points that are not connected by lines.
A “scatter diagram” is the only type of graph available in presentation graphics that directly compares values with values. A scatter diagram simply plots points.
Scatter diagrams illustrate the relationship between numeric values in different groups of data. They graphically show trends and correlations not easily detected from rows and columns of raw numbers.
Scatter diagrams are most useful with large amounts of data. Consider, for example, the relationship between personal income and family size. If you poll one thousand wage earners for their income and family size, you have a scatter diagram with one thousand points. If you combine your results so that you are left with one average income for each family size, you have a line graph.
All presentation graphics charts except pie charts are displayed with two perpendicular reference axes. The vertical, or y, axis runs from top to bottom of the chart and is placed against the left side of the screen. The horizontal, or x, axis runs from left to right across the bottom of the screen.
The x axis is the category axis for column and line charts and the value axis for bar charts. The y axis is the value axis for column and line charts and the category axis for bar charts.
The “chart window” defines that part of the screen on which the chart is drawn. By default, the window fills the entire screen, but presentation graphics allows you to resize the window for smaller graphs. By redefining the chart window to different screen locations, you can view separate graphs together on the same screen.
While the chart window defines the entire graph including axes and labels, the “data window” defines only the actual plotting area. This is the portion of the graph to the right of the y axis and above the x axis. You cannot specify or adjust the size of the data window. Presentation graphics automatically determines its size based on the dimensions of the chart window.
Each of the five types of presentation graphics charts can appear in two different “chart styles,” as described in Table 10.2.
Table 10.2 Presentation Graphics Chart Styles
Chart Type | Chart Style #1 | Chart Style #2 |
Pie | With percentages | Without percentages |
Bar | Side-by-side | Stacked |
Column | Side-by-side | Stacked |
Line | Points with lines | Points only |
Scatter | Points with lines | Points only |
Bar and column charts have only one style when displaying a single series of data. The styles “side-by-side” and “stacked” are applicable when more than one series appears on the same chart. The first style arranges the bars or columns for the different series side by side, showing relative heights or lengths. The stacked style, illustrated for a column chart in Figure 10.3, emphasizes relative sizes between bars or columns.
Summary: Legends help identify individual data series.
When displaying more than one data series on a chart, presentation graphics uses different colors, line styles, or patterns to differentiate them. Presentation graphics also can display a “legend” that labels the different series of a chart. For a pie chart, the legend labels individual slices of the pie.
A sample of the color and pattern used to graph the series appears next to the series label. This identifies the set of data to which the labels belong.
You may change the font displayed by calling the _registerfonts and _setfont functions (see Chapter 9, “Communicating with Graphics,” for more information about using fonts). If you don't select a font, presentation graphics defaults to an internal font.