Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Creating Graphs

Example: Create a 3-D Pie Chart

Open the Fitness Data Set

In this example, you create a pie chart from the Fitness data set. If you have not already done so, open the Fitness data set by following these steps:

  1. Select Tools arrow Sample Data ...
  2. Select Fitness.
  3. Click OK to create the sample data set in your Sasuser directory.
  4. Select File arrow Open By SAS Name ...
  5. Select Sasuser from the list of Libraries.
  6. Select Fitness from the list of members.
  7. Click OK to bring the Fitness data set into the data table.

Specify Pie Chart Variable

To specify the variable to be charted and the chart type, follow these steps:

  1. Select Graphs arrow Pie Chart ...
  2. Select runtime from the candidate list, and click Chart to make minutes to run 1.5 miles the charted variable.
  3. Select 3-D under Pie type to specify a three-dimensional chart.

    c05p07.gif (5223 bytes)

    Figure 5.23: Pie Chart Variable and Type

Specify Pie Chart Options

To specify your pie chart options, such as the number of slices, follow these steps:

  1. Click on the Options button to display the Pie Chart Options dialog.
  2. In the Number of Slices tab, design a chart with ten slices by selecting N slices and clicking on the up arrow until the number 10 is visible.

    c05p08.gif (6256 bytes)

    Figure 5.24: Number of Slices in Pie Chart

  3. In the Slice Values tab, select Percent under Statistic to chart in order to chart the percentage of each runtime in relation to the whole.

    c05p09.gif (8205 bytes)

    Figure 5.25: Statistic to Chart

  4. In the Labels tab, select Slice level under Label slices with. Select Arrow under Corresponding label placement. Each slice indicates a runtime, and each label is placed outside the disc, with an arrow pointing to the corresponding slice.

    c05p10.gif (6603 bytes)

    Figure 5.26: Pie Chart Labels

  5. In the Details tab, deselect Show default heading above chart under Chart options. You provide a new heading in the Titles dialog.

    c05p11.gif (7235 bytes)

    Figure 5.27: Deselect Default Heading

  6. Click OK to save your changes and return to the Pie Chart dialog.

Specify Pie Chart Titles

To specify the titles for your pie chart, follow these steps:

  1. Click on the Titles button in the Pie Chart dialog.
  2. In the Pie Chart tab, type Percentage of Each Runtime in the first field.

    c05p12.gif (3917 bytes)

    Figure 5.28: Pie Chart Title

  3. If you did not change the global title in the first exercise in this chapter, click on the Global tab. Type Fitness Report in the first field. This global title is saved across all Analyst sessions until you change it.

    c05p13.gif (3699 bytes)

    Figure 5.29: Global Title

  4. Click on OK to save your title changes.

Generate Pie Chart

To display your pie chart, click OK in the Pie Chart dialog.

c05p14.gif (17531 bytes)

Figure 5.30: 3-D Pie Chart

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.