General Plot Properties |
In this example, you visualize the distribution of points in a scatter plot, as subset by values of a categorical variable.
Open the Hurricanes data set, and create a scatter plot of latitude versus longitude. |
The scatter plot appears in Figure 9.8. The plot shows
the position of Atlantic cyclones during a 16-year period. There is
considerable overplotting in this scatter plot, particularly along a
path between the Cape Verde Islands (lower-right corner of the plot)
and the Caribbean Sea (near the coordinates ).
Figure 9.8: A Scatter Plot
The overplotting prevents the clear examination of rare events such as
category 4 and category 5 hurricanes. You can modify the scatter plot
so that it displays only selected
observations. This makes it easier to examine these storms.
Right-click near the center of the plot, and select Plot Area Properties from the pop-up menu. |
A dialog box appears, as shown in Figure 9.9.
Figure 9.9: The Observations Tab
Select Show only selected observations. |
Click OK. |
The scatter plot updates. All of the observations disappear because none are selected. You can use another plot or the data table's Find dialog box (see the section "Finding Observations") to select data of interest.
Create a bar chart of the category variable. |
Select all category 4 and 5 hurricanes in the bar chart, as shown in Figure 9.10. |
Figure 9.10: A Bar Chart with Category 4 and 5 Hurricanes Selected
The selected observations appear in the scatter plot, as shown in
Figure 9.11. Most of the selected storms appear in the
Gulf of Mexico, the Caribbean Sea, and the Atlantic Ocean east of the
Greater Antilles.
Figure 9.11: Displaying Only Selected Observations
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.