Chapter Contents

Previous

Next
The GMAP Procedure

BLOCK Statement


Creates three-dimensional block maps on which levels of magnitude of the specified response variables are represented by blocks of varying height, pattern, and color.

Requirements: At least one response variable is required. The ID statement must be used in conjunction with the BLOCK statement.
Global statements: FOOTNOTE, LEGEND, PATTERN, TITLE



Description

The BLOCK statement specifies the variable or variables that contain the data that are represented on the map by blocks of varying height, pattern, and color. This statement automatically

You can use statement options to enhance the appearance of the map. For example, you can specify the width of the blocks, the outline colors for the blocks and the map areas, and the angle of view. Other statement options control the response levels.

In addition, you can use global statements to modify the block patterns, the map patterns, and the legend, as well as to add titles and footnotes to the map. You can also use an Annotate data set to enhance the map.
BLOCKresponse-variable(s) </ option(s)>;

option(s) can be one or more options from any or all of the following categories:


Required Arguments

response-variable(s)
specifies one or more variables in the response data set that contains response values that are represented on the map. Each response variable produces a separate map. All variables must be in the input data set. Separate multiple response variables with blanks.

Blocks are not drawn for missing values for the response variable unless you use the MISSING option in the BLOCK statement.
See also: About Response Variables


Options

Options in a BLOCK statement affect all of the maps that are produced by that statement. You can specify as many options as you want and list them in any order.

ANNOTATE=Annotate-data-set
ANNO=Annotate-data-set
specifies a data set to annotate maps that are produced by the BLOCK statement.

Note:   Annotate coordinate systems 1, 2, 7, and 8 are not valid with block maps.  [cautionend]
See also: The Annotate Data Set

AREA=n
specifies that a different map pattern be used for the surface of each map area or group of map areas on the map. The value of n indicates which variable in the ID statement determines the groups that are distinguished by a surface pattern. If your ID statement has only one map area identification variable, use AREA=1 to indicate that each map area surface uses a different pattern. If you have more than one variable in your ID statement, use n to indicate the position of the variable that defines groups that will share a pattern. When you use AREA=, the map data set should be sorted in order of the variables in the ID statement.

By default, AREA= fills map areas by rotating the default hatch patterns through the colors list, beginning with the M2N0 pattern. Unless specified otherwise, the outline color is the first color in the colors list. If the V6COMP graphics option or a PATTERN statement is specified, then the value of COUTLINE= defaults to SAME.

You can specify pattern fills and/or colors with PATTERN statements that specify map/plot patterns. A separate PATTERN definition is needed for each specified area. For more information about default pattern behavior or pattern specifications, see PATTERN Statement.
Featured in: Assigning a Format to the Response Variable

BLOCKSIZE=size
specifies the width of the blocks. The unit for size is the character cell width for the selected output device. By default, BLOCKSIZE=2.
Featured in: Creating Maps with Drill-down for the Web

CBLKOUT=block-outline-color | SAME
outlines all blocks in the specified color. SAME specifies that the outline color of a block or a block segment or a legend value is the same as the interior pattern color.

The default outline color depends on the PATTERN statement:

CBLKOUT= is not valid when SHAPE=CYLINDER.

Note:   If you specify empty block patterns, (VALUE=EMPTY in a PATTERN statement) you should not change the outline color from the default value, SAME, to a single color. Otherwise all the outlines will be one color and you will not be able to distinguish between the empty areas.  [cautionend]
Featured in: Producing a Simple Block Map and Assigning a Format to the Response Variable

CEMPTY=empty-area-outline-color
outlines empty map areas in the specified color. This option affects only map areas that are empty. Empty map areas are generated in block maps only when a map area is omitted from the response data set and the ALL option is included in the PROC GMAP statement.

The default outline color is the same as the default COUTLINE= color.
See also: ALL and Displaying Map Areas and Response Data

COUTLINE=nonempty-area-outline-color | SAME
outlines non-empty map areas in the specified color. SAME specifies that the outline color of a map area is the same as the interior pattern color.

The default outline color depends on the PATTERN statement:

Note:   If you specify empty map patterns, (VALUE=MEMPTY in a PATTERN statement) you should not change the outline color from the default value, SAME, to a single color. Otherwise all the outlines will be one color and you will not be able to distinguish between the empty areas.  [cautionend]
Featured in: Assigning a Format to the Response Variable

CTEXT=text-color
specifies a color for the text in the legend. If you omit the CTEXT= option, a color specification is searched for in this order:
  1. the CTEXT= option in a GOPTIONS statement

  2. the default, the first color in the colors list.

The CTEXT= color specification is overridden if you also use the COLOR= suboption of a LABEL= or VALUE= option in a LEGEND definition that is assigned to the map legend. The COLOR= suboption determines the color of the legend label or the color of the legend value descriptions, respectively.

DESCRIPTION='entry-description'
DES='entry-description'
specifies the description of the catalog entry for the map. The maximum length for entry-description is 40 characters. The description does not appear on the map. By default, the GMAP procedure assigns a description of the form BLOCK MAP OF variable, where variable is the name of the map variable.
Featured in: Creating Maps with Drill-down for the Web

DISCRETE
treats a numeric response variable as a discrete variable rather than as a continuous variable. When you use DISCRETE, the response variable values are not grouped into ranges; instead, the GMAP procedure uses a separate response level (block height, pattern, and color) for each different value of the formatted response variable. The LEVELS= option is ignored when you use the DISCRETE option.

Use this option if your numeric response variable is assigned a user-written format.

Note:   If the data do not contain a value in a particular range of the format, that formatted range is not displayed in the legend.  [cautionend]
Featured in: Assigning a Format to the Response Variable and Creating Maps with Drill-down for the Web (with the CHORO statement)

HTML=variable
identifies the variable in the input data set whose values create links in the HTML file created by the ODS HTML statement. These links are associated with an area of the chart and point to the data or graph you wish to display when the user drills down on the area.

HTML_LEGEND=variable
identifies the variable in the input data set whose values create links in the HTML file created by the ODS HTML statement. These links are associated with a legend value and point to the data or graph you wish to display when the user drills down on the value.

LEGEND=LEGEND<1...99>
assigns the specified LEGEND definition to the map legend. LEGEND= is ignored if the specified LEGEND definition is not currently in effect. In the GMAP procedure, the BLOCK statement produces a legend unless you use the NOLEGEND option. If you use the SHAPE= option in a LEGEND statement, only the value BAR is valid.
See also: LEGEND Statement
Featured in: Specifying Response Levels in a Block Map and Creating Maps with Drill-down for the Web

LEVELS=number-of-response-levels
specifies the number of response levels that are to be graphed when the response variables are continuous. Each level is assigned a different block height, pattern, and color combination.

If you do not use the LEVELS= option or the DISCRETE option, the GMAP procedure determines the number of response levels that use the formula FLOOR(1+3.3 log(N)), where N is the number of unique map area identification variable values.

The LEVELS= option is ignored when you use the DISCRETE option.
Featured in: Specifying Response Levels in a Block Map

MIDPOINTS=value-list
specifies the response levels for the range of response values that are represented by each level (block height, pattern, and color combination).

For numeric response variables, value-list is either an explicit list of values or a starting and an ending value with an interval increment, or a combination of both forms:
n <...n>
n TO n <BY increment>
n <...n > TO n <BY increment> <n<...n >>

By default the increment value is 1. You can specify discrete numeric values in any order. In all forms, n can be separated by blanks or commas. For example,

midpoints=(2 4 6)
midpoints=(2,4,6)
midpoints=(2 to 10 by 2)

If a numeric variable has an associated format, the specified values must be the unformatted values. For character response variables, value-list is a list of unique character values enclosed in quotes and separated by blanks:
'value-1' <...'value-n'>

The values are character strings that are enclosed in single quotation marks and separated by blanks. For example,

midpoints='Midwest' 'Northeast' 'Northwest'

Specify the values in any order. If a character variable has an associated format, the specified values must be the formatted values.

You can selectively exclude some response variable values from the map, as shown here:

midpoints='Midwest'

Only those observations for which the response variable exactly matches one of the values listed in the MIDPOINTS= option are shown on the map. As a result, observations may be excluded inadvertently if values in the list are misspelled or if the case does not match exactly.
Featured in: Creating Maps with Drill-down for the Web

MISSING
accepts a missing value as a valid level for the response variable.
See also: Displaying Map Areas and Response Data

NAME='entry-name'
specifies the name of the catalog entry for the map. The maximum length for entry-name is 8 characters. The default name is GMAP. If the specified name duplicates the name of an existing entry, SAS/GRAPH software adds a number to the duplicate name to create a unique name, for example, GMAP1.
Featured in: Creating Maps with Drill-down for the Web

NOLEGEND
suppresses the legend.

SHAPE=3D-block-shape
specifies the shape of the blocks. Use this option to enhance the look of the block shape, or to specify a different shape. 3D-block-shape can be one of the following:

The CBLKOUT= option is not valid when SHAPE=CYLINDER.
Featured in: Grouping and Subgrouping a Block Chart Specifying the Sum Statistic in Bar Charts Creating Bar Charts with Drill-down for the Web

XSIZE=map-width <units>
YSIZE=map-height <units>
specify the physical dimensions of the map to be drawn, where n is the number of units. By default, the map uses the entire procedure output area.

Valid units are CM (centimeters), IN (inches), or PCT (percentage of the graphics output area). By default, the unit is character cells (CELLS).

If you specify values for n that are greater than the dimensions of the procedure output area, the map is drawn using the default size.

XVIEW=x
YVIEW=y
ZVIEW=z
specify coordinates of the viewing position in the reference coordinate system. In this system, the four corners of the map lie on the X-Y plane at coordinates (0,0,0), (0,1,0), (1,1,0), and (1,0,0). No axes are actually drawn on the maps that are produced by PROC GMAP, but imagine that the maps are drawn in an X-Y plane.

Your viewing position cannot coincide with the viewing reference point at coordinates (0.5,0.5,0), the center of the map. The value for z cannot be negative.

If you omit the XVIEW=, YVIEW=, and ZVIEW= options, the default coordinates are (0.5,-2,3). This viewing position is well above and to the south of the center of the map. Specify one, two, or all three of the view coordinates; any that you do not explicitly specify are assigned the default values.
Featured in: Specifying Response Levels in a Block Map

Viewing Position and Viewing Reference Point shows the position of the viewing reference point, as well as the default viewing position.

Viewing Position and Viewing Reference Point

[IMAGE]


About Block Maps and Patterns

Block maps are different from other maps in that they display two different types of areas that use patterns:

By default, the blocks use solid pattern fills and the map areas use a hatch pattern of slanting lines. The map areas in block maps are the only map areas that by default do not use solid fills. The map areas and their outlines use the first color in the colors list regardless of whether the list is the device's default colors list or one specified with the COLORS= option in a GOPTIONS statement.

The BLOCK statement has the following options that explicitly control the outline colors used by the blocks and the map areas.

In addition the AREA= option controls how the map areas are patterned.

When you use PATTERN statements to define the patterns for the map, you must be sure to specify the correct type of pattern for the area. The blocks use bar/block patterns and the map areas use map/plot patterns. See PATTERN Statement for more information on specifying patterns.

Note:   If you specify only one PATTERN statement and include only the COLOR= option, that color will be used for both the blocks and the map areas. For example, this statement makes the blocks solid blue and the map areas blue hatch.  [cautionend]

pattern1 color=blue;


Chapter Contents

Previous

Next

Top of Page

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