• Print  |
  • Feedback  |

TEMPLATE Procedure: Layout Statements (Experimental)

LAYOUT Statements

CAUTION:
Creating ODS statistical graphics is an experimental feature that is available in Version 9.1. Do not use this part of the TEMPLATE procedure in production jobs.

Overview of the Layout Statements

You can use layout statements to specify the arrangement of the components of a graph. Layout statements are specified in a layout block that begins with a LAYOUT statement and ends with an ENDLAYOUT statement. Within a LAYOUT statement block, you can specify plot statements, text statements, and other layout statements to define one or more graph components. All of the statements that are within the layout block apply to that statement's layout area. Each statement can specify one or more options to modify the layout's appearance.

The three types of layouts are gridded, lattice, and overlay.

Layout statements can be nested to achieve any possible layout. For example, a common technique is to nest an overlay layout within a gridded layout so that a title can be specified outside of the overlay area. You can nest text statements within the layout statements to achieve different positions for your text within the graphic display.

With layout statements you can do the following:

If you are using ODS Graphics for the first time, begin by reading the section about statistical graphics and ODS in SAS/STAT User's Guide, which illustrates the use of ODS Graphics, and provides general information on managing your graphics. Additional examples are given in the sections for procedures that use ODS Graphics in SAS 9.1.

Note:   For definitions of terms used in this section, see Terminology.


Values for ODS Statistical Graph Options

The default value that is used for an option depends on the ODS statistical graph definition that is in use. The implementation of an option depends on the ODS destination that formats the output. In addition, if you are creating HTML output, the implementation of an attribute depends on the browser that you use.

Values for ods statistical graph options are often one of the following:

arrow, arrow-list

specifies a string value of an arrow shape, or a dynamic variable that contains an arrow shape, or a style reference to an arrow shape.

An arrow-list specifies a sequence of arrow shapes, or a column variable that contains arrow shapes, or a dynamic variable that refers to such a column variable or to a string.

Arrow Shapes

[Arrow Shapes]

boolean, boolean-list

specifies a string value that is true or false, or a style reference to a boolean value.

A boolean-list specifies a sequence of boolean values, or a column variable that contains boolean value, or a dynamic variable that refers to such a column variable or to a string .

For all attributes that support a value of ON, the following forms are equivalent:

ATTRIBUTE-NAME
ATTRIBUTE-NAME=ON
For all attributes that support a value of variable, variable can be any variable that you declare in the table definition with the DYNAMIC, MVAR, or NMVAR statement. If the attribute is a boolean, then the value of variable should resolve to either true or false. The following values represent a true or false value.
Boolean Values
True False
ON OFF
_ON_ _OFF_
TRUE FALSE
YES NO
_YES_ _NO_
1 0

color, color-list

is a string that identifies a color.

A color-list specifies a sequence of colors, or a column variable that contains colors, or a dynamic variable that refers to such a column variable or to a string.

A color can be

  • any of the color names that are supported by SAS/GRAPH. These names include

    • a predefined SAS color (for example, blue or VIYG)

    • a red/green/blue (RGB) value (for example, CX0023FF)

    • a hue/light/saturation (HLS) value (for example, H14E162D)

    • a gray-scale value (for example, GRAYBB).

  • an RGB value with a leading pound sign (#) rather than CX (for example, #0023FF).

  • one of the colors that exists in the SAS session when the style definition is used:

    • DMSBLUE

    • DMSRED

    • DMSPINK

    • DMSGREEN

    • DMSCYAN

    • DMSYELLOW

    • DMSWHITE

    • DMSORANGE

    • DMSBLACK

    • DMSMAGENTA

    • DMSGRAY

    • DMSBROWN

    • SYSBACK

    • SYSSECB

    • SYSFORE.

    Note:   Use these colors only if you are running SAS in the windowing environment.

  • an English description of an HLS. Such descriptions use a combination of words to describe the lightness, the saturation, and the hue (in that order). You can use the Color Naming System to form a color by

    • combining a chromatic hue with a lightness, a saturation, or both

    • combining the achromatic hue gray with a lightness

    • combining the achromatic hue black or white without qualifiers.

    The words that you can use are shown in the following table:
    Hue/Light/Saturation (HLS) Values
    Lightness Saturation Chromatic Hue Achromatic Hue


    blue black *
    very dark grayish purple
    dark moderate red
    medium strong orange | brown gray **
    light vivid yellow
    very light
    green







    white *
    * Black and white cannot be combined with a lightness or a saturation value.

    ** Gray cannot be combined with a saturation value.

    You can combine these words to form a wide variety of colors. Some examples are

    • light vivid green

    • dark vivid orange

    • light yellow.

Note:   The Output Delivery system first tries to match a color with a SAS/GRAPH color. Thus, although brown and orange are interchangeable in the table, if you use them as unmodified hues, they are different. The reason for this is that ODS interprets them as SAS colors, which are mapped to different colors.

You can also specify hues that are intermediate between two neighboring colors. To do so, combine one of the following adjectives with one of its neighboring colors:

  • reddish

  • orangish

  • brownish

  • yellowish

  • greenish

  • bluish

  • purplish.

For example, you can use the following as hues:

  • bluish purple

  • reddish orange

  • yellowish green.

See also: SAS/GRAPH Reference, Volumes 1 and 2 for information about SAS/GRAPH colors.
column, column-list

specifies a column variable that contains either double-precision values or string values, or a dynamic variable that refers to such a column variable.

A column-list specifies a sequence of column variables, or a column variable that contains column variables, or a dynamic variable that refers to such a column variable, or a dynamic variable that refers to a string containing a list of column variables. Values within the columns can be either double-percision or strings.

dimension, dimension-list

is a nonnegative number, optionally followed by one of the following units of measure:

Units of Measure for Dimension
cm centimeters
em standard typesetting measurement unit for width
ex standard typesetting measurement unit for height
in inches
mm millimeters
pt a printer's point

A dimension-list specifies a sequence of formats, or a column variable that contains formats, or a dynamic variable that refers to such a column variable or to a string.

Default: For the Printer destination, units of 1/150 of an inch
font-definition

A value can also be a font definition. A font definition has the following general format:

("font-face-1 <... , font-face-n>", font-size, keyword-list)
If you specify only one font face and if its name does not include a space character, you can omit the quotation marks. If you specify more than one font face, the destination device uses the first one that is installed on your system.

font-size specifies the size of the font. font-size can be a dimension or a number without units of measure. If you specify a dimension, you must specify a unit of measure. Without a unit of measure the number becomes a size that is relative to all other font sizes in the document. See the discussion of dimensions.

keyword-list specifies the font weight, font style, and font width. You can include one value for each, in any order. The following table shows the keywords that you can use:

Font Keywords
Keywords for Font Weight Keywords for Font Style Keywords for Font Width
MEDIUM ITALIC NORMAL*
BOLD ROMAN COMPRESSED*
DEMI_BOLD* SLANT EXTRA_COMPRESSED*
EXTRA_BOLD*
NARROW*
LIGHT
WIDE*
DEMI_LIGHT*
EXPANDED*
EXTRA_LIGHT*

* Few fonts honor these values.

format, format-list

is a SAS format or a user-defined format.

A format-list specifies a sequence of formats, or a column variable that contains formats, or a dynamic variable that refers to such a column variable or to a string.

integer, integer-column, integer-list, integer-column-list

specifies a column variable that contains integer values, or a dynamic variable that refers to such a column variable.

An integer-listspecifies a sequence of integer values, or a column variable that contains integer values, or a dynamic variable that refers to such a column variable or to a string.

integer-column-list specifies a sequence of column variables, or a column variable that contains column variables, or a dynamic variable that refers to such a column variable, or a dynamic variable that refers to a string containing a list of column variables. Values within the columns must be integers.

line, line-list

specifies a string value of a line pattern, or a dynamic variable that contains such a string, or a style reference to a line pattern. Line patterns are chosen for discriminability. Because of different densities, equal weighting is impossible for lines of the same thickness. Instead, line patterns are ordered to provide a continuum of weights which is useful when displaying confidence bands.

A line-list specifies a sequence of line patterns, or a column variable that contains line patterns, or a dynamic variable that refers to such a column variable or to a string.

Line Patterns

[Line Patterns]

marker, marker-list

specifies a string value of a maker symbol, or a dynamic variable that contains a marker symbol, or a style reference to a marker symbol.

A marker-list specifies a sequence of marker symbols, or a column variable that contains marker symbols, or a dynamic variable that refers to such a column variable or to a string, or one of the marker sets.

Marker Symbols

[Marker Symbols]

Marker Symbol Sets

[Marker Symbol Sets]

number, numeric-list, numeric-column, numeric-column-list

specifies a value, or a dynamic variable that contains a double-precision value, or an expression that resolves to a double-precision value, or a style reference to a double-precision value.

A numeric-list specifies a sequence of double-precision values, or a column variable that contains double-precision values, or a dynamic variable that refers to such a column variable or to a string.

A numeric-column specifies a column variable that contains double-precision values, or a dynamic variable that refers to such a column variable.

A numeric-column-list specifies a sequence of column variables, or a column variable that contains column variables, or a dynamic variable that refers to such a column variable, or a dynamic variable that refers to a string containing a list of column variables. Values within the columns must be double-precision.

'string, string-list, string-column, string-column-list'

is a quoted character string.

A string-list specifies a sequence of strings, or a column variable that contains strings, or a dynamic variable that refers to such a column variable or to a string .

A string-column specifies a column variable that contains string values, or a dynamic variable that refers to such a column variable.

A string-column-list specifies a sequence of column variables, or a column variable that contains column variables, or a dynamic variable that refers to such a column variable, or a dynamic variable that refers to a string containing a list of column variables. Values within the columns must be strings.

style-reference

is a reference to an attribute that is defined in a style element.

In the ODS statistical graph definitions that SAS provides, options for plot features are specified with a style reference in the form style-element:attribute, rather than a specific value. For example, the symbol, color, and size of markers for a basic scatter plot is specified in a SCATTERPLOT statement as follows:

scatterplot x=X y=Y/
   markersymbol=GraphDataDefault:markersymbol
   markercolor=GraphDataDefault:contrastcolor
   markersize=GraphDataDefault:markersize
The above style-references guarantee a common appearance for markers used in all basic scatter plots, which is controlled by the GraphDataDefault style element in the style definition that you specify.

In order to create your own style definition, or to modify a style definition to use with ODS Graphics, you need to understand the relationship between style elements and graph features. For more information, see "ODS Statistical Graphics and ODS Styles: Usage and Reference (Experimental)" at http://support.sas.com/documentation/onlinedoc/base/.

Style definitions are created and modified with the TEMPLATE procedure. For more information, see the section about creating a style definition in SAS Output Delivery System: User's Guide.


Previous Page | Next Page | Top of Page