Chapter 11
In This Chapter
Working with the Graphs menu
Introducing Chart Builder
Using the Graphboard Template Chooser
SPSS can display your data in a bar chart, a line graph, an area graph, a pie chart, a scatterplot, a histogram, a collection of high-low indicators, a box plot, or a dual-axis graph. Adding to the flexibility, each of these basic forms can have multiple appearances. For example, a bar chart can have a two- or three-dimensional appearance, represent data in different colors, or contain simple lines or I-beams for bars. The choice of layouts is almost endless. If you really get brave, someday you can learn the programming language behind the graphs called Graphics Production Language (GPL), which truly allows you to do almost anything, but we’re getting ahead of ourselves.
The Graphs menu in the SPSS Data Editor window has three main options: Chart Builder, Graphboard Template Chooser, and Legacy Dialogs (the other options you see are Python plug-ins). These options are different ways of doing the same job. The only reason to do charts with the Legacy Dialogs is if your boss, or professor, or co-workers tell you to. And they’re only going to do that if they’ve been doing it that way for years and changing is too much trouble. In short, don’t use the Legacy Dialogs. In this chapter, we work only with the other two.
The Graphboard Template Chooser is a better way of building graphs — and when it hit the scene, the original way of building graphs became known as Legacy. A few years later, an even better procedure for building charts was devised and added to the menu — Chart Builder. All three building methods are in place primarily for people who are in the habit of using the older procedures, but if you build a lot of graphs, you may find advantages and uses for all of them. You can get the same graphs from all three; only the process is different.
SPSS contains Chart Builder, which uses a graphic display to guide you through the steps of constructing your display. It checks what you’re doing as you proceed and won’t allow you to use things that won’t work.
The following example steps you through the process of creating a bar chart, but you can use the same fundamental procedure to build a chart of any design. You can follow this tutorial once to see how it all works. Later on, you can use your own data and choices.
The following steps build a bar chart:
www.dummies.com/go/spss
).Choose Graphs ⇒ Chart Builder.
A warning appears, informing you that before you use this dialog box, measurement level should be set properly for each variable in your chart. (We have the correct measurement level so you can proceed.)
Click OK.
The Chart Builder dialog box appears, as shown in Figure 11-1. If a graph was generated previously, the display will be different, and you’ll need to click the Reset button to clear the Chart Builder display.
In the Choose From list, select Bar as the graph type.
The fundamental types of bar charts appear in the gallery to the right of the list.
Define the general shape of the bar graph to be drawn.
You can do so in two ways. The simplest is to choose one member from the set of diagrams of bar graphs appearing immediately to the right of the list. For this exercise, select the diagram in the upper-left corner and drag it to the large chart preview panel at the top.
Alternatively, you can click the Basic Elements tab (instead of the Gallery tab) and drag one image from each of the two displayed panels to the panel on top, which constructs the same diagram as the bar graph.
Figure 11-2 shows the appearance of the window after the dragging is complete. The result is the same no matter which procedure you follow.
You can always back up and start over: At any time during the design of a graph, click the Reset button. Anything you dragged to the display panel is deleted, and you can start from scratch.
Click Close to close the Element Properties window (see Figure 11-3).
This window should’ve popped up when you dragged the graphic layout to the panel. This dialog box is not needed for this example, so you can close it. If it didn’t appear but you’d like to see it, you can click the Element Properties button at any time.
In similar fashion, select the variable with the label and name Region of Interview (region) and drag it to the X-Axis label in the diagram.
The screen now looks like the one shown in Figure 11-4.
The graphics display inside the Chart Builder window never represents your actual data, even after you insert variable names. This window simply displays a diagram that demonstrates the composition and appearance of the graph that will be produced.
Click the OK button to produce the graph.
An SPSS Statistics Viewer window appears, containing the graph shown in Figure 11-5. This graph is based on the actual data; it shows that the average number of years of education varied little from one part of the country to the next in this survey.
These steps demonstrate the simplest way possible of generating a chart. Most of the options available to you were left out of the example so it would demonstrate the simplicity of the basic process. The result could also use a little editing to the y-axis, but editing is covered in Chapter 18. The following sections describe the options.
The example in the preceding section uses the Gallery tab to select the type and appearance of the chart. Alternatively, you can click the Basic Elements tab in the Chart Builder dialog box and select one part of the chart from each of the two panels shown in Figure 11-6.
The Basic Elements tab allows you to choose one element from column A and another from column B. You drag one image from each panel into the panel at the top, and they combine to construct a diagram of the graph you want.
The result is the same as you get from using the Gallery tab. The only difference is that you use the Basic Elements tab to build the graph from its components. Whether you use this technique or the Gallery depends on your conception of the graph you want to produce.
After you’ve selected the type and appearance of your chart through either the Gallery tab or the Basic Elements tab, you can click the Groups/Point ID tab in the Chart Builder dialog box, which provides you with a group of options you can use to add another dimension to your graph.
In the example in Figure 11-7, we selected the Rows Panel Variable option, which generates a multifaceted graph. The new dimension adds a separate graph for whether the respondent uses a computer. A separate set of bars is drawn: one for those who use a computer, and one for those that do not.
The Columns Panel Variable option (located in the Groups/Point ID tab of the Chart Builder) enables you to add a variable along the other axis, thus adding another dimension. Adding variables and new dimensions this way is known as paneling, or faceting.
Clustering (gathering data into groups) can also be done along the x- or y-axis if the variables are the type that will cluster (or bin) properly.
Figure 11-8 shows the window you get when you click the Titles/Footnotes tab in the Chart Builder dialog box. Each option in the bottom panel places text at a different location on the graph. When you select an option, the Element Properties window appears so you can enter the text for the specified location.
You can use the Element Properties dialog box at any time during the design of a chart to set the properties of the individual elements in the chart. One mode of the dialog box is shown in Figure 11-3; another is shown in Figure 11-9. It changes every time you choose a different member from the list at its top.
Okay, the upcoming list of options is long, but four facts make them simple to use:
The following is a simple explanation of all the possible options that can appear in an Element Properties dialog box:
Excluded: Any value you want to exclude from the Order list appears in this list. To move a value back to the Order list (which also causes the value to reappear on the chart), select its name and click the arrow to the right of the list.
If a value (or a margin annotation representing a value) is unexpectedly missing from a graph based your selections, look in this Excluded list. You may have excluded too much.
Clicking the Options button in the Chart Builder dialog box opens the Options dialog box, shown in Figure 11-10.
When you define the characteristics of a variable, you can specify that certain values be considered missing values. The options in the Break Variables area let you decide whether you want those values included or excluded from your chart. You can also specify how you’d like summary statistics handled. (Missing values are discussed in Chapter 4, and the different types of summary data are described in Chapter 13.)
Templates are files that contain all or part of a chart definition. You can insert one or more names of template files into the list in this window, and SPSS will apply those template definitions as the default starting points for all charts you build. You create a template file from a finished chart displayed in SPSS Statistics Viewer. You find out more on making templates later in this chapter.
The Wrap Panels option determines how the panels are displayed when you have a number of them in a chart. SPSS is using the word panel to refer to the rectangular area in SPSS Statistics Viewer in which a chart is placed. Normally the panels shrink automatically to fit; if you select this option, however, they remain full-size and wrap to the next line.
The charts you build by choosing Graphs ⇒ Graphboard Template Chooser are similar to those you build by using the other menu selections, but you get less guidance along the way. The way you begin is a bit different. You indicate the variable you want to use, and the menu shows you all your choices for that combination of variables.
There are two big reasons to use the Graphboard Template Chooser:
First, you select the variables you want to include (Ctrl+click to select multiple variables), which causes the available kinds of charts (such as bar, dot, or line) to appear onscreen, as shown in Figure 11-11. Using the tabs at the top of the screen (Basic, Detailed, Titles, Options), you can choose screens that allow you to set the options. Note the three “choropleth” options. Those are your maps, but the GSS Survey dataset has broad regions, not more specific geographic info, so mapping is not an option with this data.
If you get things balled up, it’s easy to restart. The Reset button removes everything you’ve entered in all the tabbed windows and restores all the defaults.
The Help button provides some information about whichever list of options is displayed at the moment.
18.189.185.251