Example: Create a Polygon Plot

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:

  1. Open the States48 data set.

  2. Select GraphPolygon Plot from the main menu, as shown in Figure 6.20.

    Figure 6.20: Selecting a Polygon Plot

    The Polygon Plot dialog box appears. (See Figure 6.21.)

  3. Select the lon variable, and click Set X.

  4. Select the lat variable, and click Set Y.

  5. Select the state variable. Hold down the CTRL key and select the segment variable. Click Add ID.

  6. Click OK.

    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.

  7. Right-click near the center of the plot, and select Plot Area Properties 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

  8. Click the Observations tab, as shown in Figure 6.23.

    Figure 6.23: The Observations Tab

  9. Select state from the Fill: Blend menu.

  10. Select a gradient color map from the Fill menu.

  11. Click OK.

    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.