In this section you create a polygon plot of the lat
and lon
variables of the States48
data set. The lat
variable gives the latitude of state boundaries for the lower 48 contiguous United States. The lon
variable gives the corresponding longitude.
To create a polygon plot:
Open the States48
data set.
Select Figure 6.20.
→ from the main menu, as shown in
The Polygon Plot dialog box appears. (See Figure 6.21.)
Select the lon
variable, and click .
Select the lat
variable, and click .
Select the state
variable. Hold down the CTRL key and select the segment
variable. Click .
Click
.Note: The order of the ID variables is important. The second variable should be nested in the first variable.
Figure 6.21: The Polygon Plot Dialog Box
A polygon plot appears (similar to Figure 6.24) that shows the contiguous 48 United States. The color of a region (in this example, a state) is determined by the first observation encountered for that region. The observation’s fill color determines the color of the interior of the polygon; the outline color determines the color of the region’s outline.
For these data, the observations are all black. To make the polygon plot look more like a map, you can color observations
by the value of the state
variable.
Right-click near the center of the plot, and select
from the pop-up menu.The Plot Area Properties dialog box appears. (See Figure 6.22.)
Figure 6.22: Plot Area Properties for a Polygon Plot
Click the Observations tab, as shown in Figure 6.23.
Figure 6.23: The Observations Tab
Select state
from the menu.
Click
.The polygon plot is now colored according to your choice of color map. (See Figure 6.24.)
Figure 6.24: A Polygon Plot
The polygon plot supports the selection of polygonal regions. For example, you can click a state to select the observations that define the boundary of that state. You can click while holding down the CTRL key to select observations that define multiple states. You can also draw a selection rectangle to select observations that define contiguous states.
If a state is composed of two or more components, you can click each component independently. For example, you can select just the upper peninsula of Michigan, or select only Long Island, New York. You can also color each region independently.