GMAP Procedure

SURFACE Statement

Creates three-dimensional surface maps in which levels of magnitude of the specified response variables are represented by spikes of varying height.
Restriction: Not supported by Java and ActiveX
Requirement: At least one response variable is required and must be numeric. The ID statement must be used in conjunction with the SURFACE statement.
Global statement: TITLE, FOOTNOTE, NOTE

Syntax

SURFACE response-variable(s) </ option(s)>;

Summary of Optional Arguments

Appearance options
specifies a data set to annotate onto maps that are produced by the SURFACE statement.
specifies the color that is used to draw the surface map.
specifies a denominator to use in the distance decay function.
specifies the number of lines used to draw the surface map.
specifies the degrees of the angle at which to rotate the map about the Z axis in the map coordinate system.
specifies the degrees of the angle at which to tilt the map about the X axis in the map coordinate system.
specify the physical dimensions of the map.
Description options
specifies a description of the output.
specifies the name of the GRSEG catalog entry and the name of the graphics output file, if one is created.
Mapping options
causes GMAP to collect all response values (or their statistic) and chart each region as a percentage of the whole.
overrides the GMAP default format for percent of PERCENT8.2.
specifies the statistic for GMAP to chart.

Required Argument

response-variable(s)
specifies one or more variables in the response data set. The response-variable must be numeric and must contain only positive values. Each response variable produces a separate map. All variables must be in the input data set. Multiple response variables are separated with blanks.
The GMAP procedure scales response variables for presentation on the map. The height of the spikes on the map correspond to the relative value of the response variable, not to the actual value of the response variable. However, when the viewing angle is changed, the spikes might not appear this way. The spikes in the front might appear to be higher than the spikes in the back, which represent greater values.

Optional Arguments

SURFACE statement options affect all maps that are produced by that statement.

ANNOTATE=Annotate-data-set
specifies a data set to annotate onto maps that are produced by the SURFACE statement. Annotate coordinate systems 1, 2, 7, and 8 are not valid with surface maps.
Alias:ANNO=
CBODY=surface-map-color
specifies the color that is used to draw the surface map. Regardless of the current ODS style, the default color is the first color in the current color list.
Alias:CB=
CONSTANT=n
specifies a denominator to use in the distance decay function. This function determines the base width of the spike that is drawn at each map area center.
By default, CONSTANT=10. Values greater than 10 yield spikes that are wider at the base. Values less than 10 yield spikes that are narrower at the base.
DESCRIPTION='description'
specifies a description of the output. The maximum length for description is 256 characters. The description does not appear in the output. The descriptive text is shown in each of the following:
  • the chart description for Web output (depending on the device driver). See Chart Descriptions for Web Presentations for more information.
  • the Table of Contents that is generated when you use the CONTENTS= option on an ODS HTML statement, assuming that the output is generated while the contents page is open.
  • the description and the properties for the output in the Results window.
  • the description and properties for the catalog entry in the Explorer.
  • the Description field of the PROC GREPLAY window.
The description can include the #BYLINE, #BYVAL, and #BYVAR substitution options, which work as they do when used on TITLE, FOOTNOTE, and NOTE statements. Refer to Substituting BY Line Values in a Text String. The 256-character limit applies before the substitution takes place for these options. Thus, if in the SAS program the entry-description text exceeds 256 characters, it is truncated to 256 characters, and then the substitution is performed.
Alias:DES=
Default:SURFACE MAP OF variable-name
NAME='name'
specifies the name of the GRSEG catalog entry and the name of the graphics output file, if one is created. The name can be up to 256 characters long, but the GRSEG name is truncated to eight characters. Uppercase characters are converted to lowercase, and periods are converted to underscores. The default GRSEG name is GMAP. If the name duplicates an existing name, then SAS/GRAPH adds a number to the name to create a unique name (for example, GMAP1).
If the name specified is exactly eight characters long, then the last character of the image output filename is replaced with a number. For example, myimages is changed to myimage1.
NLINES=number-of-lines
specifies the number of lines used to draw the surface map. Values can range from 50 to 100; the higher the value, the more solid the map appears and the more resources used. By default, NLINES=50.
PERCENT
causes GMAP to collect all response values (or their statistic) and chart each region as a percentage of the whole. You can use the STATISTIC= option to change how the percentage is calculated—whether as a percentage of the SUM, FREQUENCY, or MEAN. If you do not use the STATISTIC= option, then STATISTIC=FIRST is assumed and the response variable of only the first observation of each region is counted. If the response variable is a text field, then STATISTIC=FREQUENCY is used, even if you specify a different value for the STATISTIC= option.
ROTATE=degrees
specifies the degrees of the angle at which to rotate the map about the Z axis in the map coordinate system. The degrees argument can be any angle. Positive values indicate rotation in the counterclockwise direction. By default, ROTATE=70. The ROTATE= option also affects the direction of the lines that are used to draw the surface map.
STATFMT=format-specification
overrides the GMAP default format for percent of PERCENT8.2. Use this format when using calculated values. The STATFMT option is typically used when the STATISTIC=FREQUENCY option or the PERCENT option is used.
Alias:SFMT=, SFORMAT=, STATFORMAT=
STATISTIC=FIRST | SUM | FREQUENCY | MEAN
specifies the statistic for GMAP to chart. For character variables, FREQUENCY is the only allowed value—any other value is changed to FREQUENCY and a warning is issued. The frequency of a variable does not include missing values unless the MISSING option is specified.
FIRST
GMAP matches the first observation from the DATA= data set and charts the response value from this observation only. This is the default. If more rows exist that are not processed, a warning is issued to the log.
SUM
All observations matching a given ID value are added together and the summed value is charted.
FREQUENCY
A count of all rows with nonmissing values is charted unless you specify the MISSING option.
MEAN
All observations matching a given ID value are added together and then divided by the number of nonmissing observations matched. This value is then charted unless you specify the MISSING option.
Alias:STAT=
TILT=degrees
specifies the degrees of the angle at which to tilt the map about the X axis in the map coordinate system. The value of degrees can be 0 to 90. Increasing values cause the map to tilt backward and makes the spikes more prominent. Decreasing values make the map shape more distinguishable and the spikes less prominent. TILT=90 corresponds to viewing the map edge-on, whereas TILT=0 corresponds to viewing the map from directly overhead. By default, TILT=70.
XSIZE=map-width <units>
YSIZE=map-height <units>
specify the physical dimensions of the map. By default, the map uses the entire procedure output area.
Valid units are CELLS (character cells), CM (centimeters), IN (inches), or PCT (percentage of the graphics output area). The default unit is CELLS.
If you specify values for map-width and map-height that are greater than the dimensions of the procedure output area, the map is drawn using the default size. And if you specify only one dimension, the other is scaled to maintain the aspect ratio.

Details

Description

The SURFACE statement specifies the variable or variables that contain the data that are represented on the map by raised map areas. This statement automatically determines the midpoints. You can use statement options to control spike proportions, specify the angle of view, and modify the general appearance of the map. For example, you can select the color and number of lines for the representation of the surface area. You can control the selection of spike heights and base widths.
In addition, you can use global statements to add titles and footnotes to the map. You can also enhance the map with an Annotate data set.