|Doing More with SAS/ASSIST Software|
In the "Graphics" chapter of Getting Started with the SAS System Using SAS/ASSIST Software, you learned how to create a simple pie chart. This section describes some of the more advanced options available when generating pie charts.
|Creating a Pie Chart|
In this section you create a pie chart that shows
of the CLASS table falls into each age group. You select the pattern, labeling,
and header options, and explode a slice.
Pie Chart Window
The sizes of the slices are determined by the values of the chart column. If you have any slices that represent four percent or less of the total pie, these slices are grouped together automatically into one slice labeled OTHER.
You select Use discrete chart column value to display one slice of pie for each age represented in the CLASS table, that is 11, 12, 13, 14, 15, and 16. The default for the number of bars is Let the number of midpoints default, which lets the procedure determine the number of midpoints (pie slices) for the chart column. Each midpoint represents a median of a range of values. In this example, if you use Let the number of midpoints default, the pie slices represent the midpoints of the AGE column, that is 11.4, 12.6, 13.8, 15, and 16.2.
The window that appears when you select Number of slices is different for numeric and character chart columns.
For the 2ND and 5TH areas, leave the pattern as Solid.
For the 3RD and 6TH areas, select Empty as the pattern.
The pattern selected by default for the pie slices is Solid. If you print a black and white graphic as shown in this book, you can use the pattern options to distinguish one pie slice from another.
If you print a color graphic, you can use colors for
the various pie slices to distinguish one pie slice from another. To display
a list of valid colors, type
? in the first position of the Color field
and press ENTER. Select the color you want to use.
Labeling Options Window
You choose the label selections as indicated so that the percent of students in each age group is shown on the pie. If you leave Label slice with value of each slice selected, the number of students in each age group (rather than the percentage) is shown on the pie.
General Slice Options Window
Explode a Pie Slice
13and select OK.
Pie Chart Output
Note: Titles carry over from one report or graphic to another. If you do not type a title and a title was selected previously in the current SAS/ASSIST session, the previous title automatically appears on this graphic.
If the title Mean Weight by Age
appears at the top of the chart, this title carried over from the chart created
in the previous section. To delete the title, from the Pie Chart window, select Edit, Titles, and
|Other Pie Chart Options|
By default, pie charts are two dimensional. However, you can select 3D, Donut, or Star to produce pie charts as shown in the following examples.
Three-dimensional Pie Chart Output
Donut Pie Chart Output
Star Pie Chart Output
By default, pie slices represent the frequency of each
of the chart column. By selecting Slice values,
however, you can make the slices represent one of several statistics on analysis
column for each value of the chart column. For example, using the CLASS table,
you could select the WEIGHT column as an analysis column and Sum as a statistic; the slices would then represent the total
weight of the children of each age as a percentage of the total weight of
all the children.
By Selecting Additional Options, you can
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.