• Print  |
  • Feedback  |

TEMPLATE Procedure: Layout Statements (Experimental)

LAYOUT LATTICE Statement


Defines a grid of graphs that automatically aligns data areas, labels, and headings across the columns and rows of the layout, and automatically scales axis data ranges.
LAYOUT LATTICE </ option(s)> ;
cell-content-statements | ODS-Graph-statement(s);
<axis-statement(s);>
<heading-statement(s);>
<sidebar-statement(s);>
ENDLAYOUT;


Usage Information

Parts of a Lattice Layout

[Parts of a Lattice Layout]

Requirement:

You must specify an ENDLAYOUT statement to complete the LAYOUT LATTICE block.

Default

The LAYOUT LATTICE statement automatically aligns the following:

  • axis labels, column labels, and row labels across the columns and rows

  • headings with the columns and/or rows

  • a sidebar with the columns or rows of the layout

Tip:

You can use many sub-statements in order to control the layout contents and the appearance of the contents of a LAYOUT LATTICE block.

Tip:

The layout that you create can scale the data ranges that are displayed in the graphs. The data ranges are based on the values that are specified by the HRANGE= and VRANGE= options.

For column axes, the layout can separately scale the data ranges for each column, or it can scale the data ranges across all columns. Similarly, for row axes, the layout can separately scale the data ranges for each row, or it can scale the data ranges across all rows.

Main discussion:

Lattice Layouts


Options

LAYOUT LATTICE Options
Option Description
BACKGROUND= color | style-reference Specifies the background color of the graph.
BACKTRANSPARENCY= number Specifies the degree of the transparency of the background color.
BORDER=boolean
Displays the border around the layout.
BORDERCOLOR= color | style-reference Specifies the border color of the layout.
BORDERPATTERN=line | style-reference Specifies the border pattern of the layout.
BORDERTHICKNESS=dimension Specifies the border thickness of the layout.
COLUMNGUTTER= dimension Specifies the amount of empty space that is between the columns.
COLUMNS= integer Specifies the number of columns.
COLUMNWEIGHT= (numeric-list) Specifies the fractional proportion of each cell relative to the overall grid width, not including headings and sidebars.
HEIGHT= dimension Specifies the height of the layout area.
HRANGE= DATA | UNIONALL | UNION Specifies the horizontal data ranges of graphs within the layout.
ORDER= ROWMAJOR | COLUMNMAJOR Specifies whether cells are filled by columns or by rows.
PADBOTTOM= dimension Specifies the amount of empty space that is at the bottom of the layout.
PADLEFT= dimension Specifies the amount of empty space that is on the left side of the layout.
PADRIGHT= dimension Specifies the amount of empty space that is on the right side of the layout.
PADTOP= boolean Specifies the amount of empty space that is at the top of the layout.
ROWGUTTER=dimension Specifies amount of empty space that is before the first row, between the rows, and after the last row.
ROWS= integer Specifies the number of rows.
ROWWEIGHT= (numeric-list) Specifies the fractional proportion of each cell relative to the overall grid height, not including headings and sidebars.
VRANGE= DATA | UNIONALL | UNION Specifies the vertical data ranges of graphs within the layout.
WIDTH= dimension Specifies the width of the layout area.

BACKGROUND= color | style-reference

specifies the background color of the graph.

Default: Specified by the GraphBackground:Background style reference.
BACKTRANSPARENCY= number

specifies the degree of the transparency of the background color.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: The BACKTRANSPARENCY= option overrides the TRANSPARENCY= option for the background.
See also: TRANSPARENCY= option
BORDER= boolean

displays the border around the layout.

Default: TRUE for the outermost LAYOUT statement. FALSE for nested LAYOUT statements.
BORDERCOLOR= color | style-reference

specifies the border color of the layout.

Default: Specified by the GraphBorderLines:Foreground style reference.
BORDERPATTERN= line | style-reference

specifies the line pattern of the layout border.

Default: Specified by the GraphBorderLines:LineStyle style reference.
BORDERTHICKNESS= dimension

specifies the border thickness of the layout.

Default: 1 px
COLUMNGUTTER= dimension

specifies the amount of empty space that is between the columns.

Default: 0
Tip: If there are n columns, then there are n-1 gutters.
COLUMNS= integer

specifies the number of columns in the layout.

Default: 1
COLUMNWEIGHT= (numeric-list)

specifies the fractional proportion of each cell relative to the overall grid width, not including headings and sidebars.

Requirement: numeric-list must be enclosed in parentheses.
Tip: For the best results, if there are n columns, then the list specified should contain n values and the sum of the weights should be 1.0.
HEIGHT= dimension

specifies the height of the layout area.

Restriction: You can only specify the HEIGHT= option on the outermost LAYOUT statement.
HRANGE= DATA | UNION | UNIONALL

specifies the horizontal data ranges of graphs within the layout.

DATA

scales the horizontal data ranges separately for each cell in the layout.

UNION

scales the data ranges separately for each column in the layout.

UNIONALL

scales the data ranges across all columns in the layout.

Default: DATA
Interaction: The data ranges are only scaled if the data values are continuous and the graphs have the same orientation. If graphs cannot use the same horizontal range, or if HRANGE=DATA, then the horizontal range of each graph is determined from the data.
ORDER= ROWMAJOR | COLUMNMAJOR

specifies whether cells are filled by columns or by rows.

COLUMNMAJOR

fills the cells by columns, from the top down.

Requirement: The ROWS= option must be specified to indicate how many rows to fill before wrapping to the next column.
ROWMAJOR

fills the cells by rows, from left to right.

Default: ROWMAJOR
PADBOTTOM= dimension

specifies the amount of empty space that is at the bottom of the layout.

Default: 5px for the outermost LAYOUT statement, 0 for nested LAYOUT statements.
PADLEFT= dimension

specifies the amount of empty space on the left side of the layout.

Default: 5px for the outermost LAYOUT statement, 0 for nested LAYOUT statements.
PADRIGHT= dimension

specifies the amount of empty space that is on the right side of the layout.

Default: 5px for the outermost LAYOUT statement, 0 for nested LAYOUT statements.
PADTOP= dimension

specifies the amount of empty space that is at the top of the layout.

Default: 5px for the outermost LAYOUT statement, 0 for nested LAYOUT statements.
ROWGUTTER= dimension

specifies the amount of empty space that is before the first row, between the rows, and after the last row.

Default: 0
Tip: If there are n rows, then there are n-1 gutters.
ROWS= integer

specifies the number of rows in the layout.

Default: 1
ROWWEIGHT= (numeric-list)

specifies the fractional proportion of each cell relative to the overall grid height, not including headings and sidebars.

Requirement: numeric-list must be enclosed in parentheses.
Tip: For the best results, if there are n columns, then the list specified should contain n values and the sum of the weights should be 1.0.
VRANGE= DATA | UNION | UNIONALL

specifies the vertical data ranges of graphs within the layout.

DATA

scales the vertical data ranges separately for each cell in the layout.

UNION

scales the data ranges separately for each row in the layout.

UNIONALL

scales the data ranges across all rows in the layout.

Default: DATA
Interaction: The data ranges are only scaled if the data values are continuous and the graphs have the same orientation. If graphs cannot use the same vertical range, or if VRANGE=DATA, then the vertical range of each graph is determined from the data.
WIDTH= dimension

specifies the width of the layout area.

Restriction: You can only specify the WIDTH= option on the outermost LAYOUT statement.

ODS Graph Statements


An ODS-Graph-statement(s) can be a text statement ,plot statement , or a LAYOUT statement.

Requirement: You must specify either an ODS Graph statement or a CELL statement block.

ODS-Graph-statement(s);


Cell Content Statements


You can create one or more heading lines at the top of a cell by using the cell contents statements. The contents of each cell in a LAYOUT LATTICE statement block is specified by one or more ODS Graph statements that are specified inside a CELL statement block.

Requirement: You must specify either an ODS-Graph-statement(s) or a CELL statement block inside of the LAYOUT LATTICE statement block.

CELL;
<CELLHEADER;
ODS-Graph-statement(s);
ENDCELLHEADER;>
ODS-Graph-statement(s);
ENDCELL;

CELL Content Statements Descriptions

CELL

begins the CELL statement block.

Requirement: You must specify an ENDCELL statement to complete the CELL statement block.
Tip: If a CELLHEADER statement block is not specified inside of a CELL statement block, then the enclosed ODS-Graph-statement(s) produces the same results as if the ODS-Graph-statement(s) were specified outside of the CELL statement block.
CELLHEADER

specifies one or more headings within the cell and begins a CELLHEADER statement block.

Requirement: You must specify an ENDCELLHEADER statement to complete the CELLHEADER statement block.
Tip: You can generate multiple headings by specifying multiple ODS-Graph-statement(s) within a CELLHEADER statement block.
ODS-Graph-statement(s)

generates the content of a single cell.

See: ODS Graph Statements.

Example

The following example creates a two column layout with one cell heading.

 Note about code
layout lattice / columns=2 columngutter=5 
                 width=320px height=240px;
 Note about code
   scatter x=x y=t;
 Note about code
   cell;
      cellheader;
         entry "Cell Heading" / border=true;
      endcellheader;
   scatter x=x y=y;
   endcell;
 Note about code
endlayout;

Two Column Layout with One Cell Heading

[Two Column Layout with One Cell Heading]


Axis Statements


You can display axes and axis labels for the columns and rows in a layout by using the axis statements.

COLUMNAXES;
AXISCOMP axis-option(s);
ENDCOLUMNAXES;
ROWAXES;
AXISCOMP axis-option(s);
ENDROWAXES;
COLUMN2AXES;
AXISCOMP axis-option(s);
ENDCOLUMN2AXES;
ROW2AXES;
AXISCOMP axis-option(s);
ENDROW2AXES;

Axis Statements Descriptions

Primary Axes

AXISCOMP

specifies one or more axis options.

Requirement: The AXISCOMP statement must be used inside of a primary or secondary column or row axis statement block.
Requirement: You must specify at least one axis-option.
Requirement: Within a COLUMNAXES statement block, the number of AXISCOMP statements must match the number of columns.
Requirement: Within a ROWAXES statement block, the number of AXISCOMP statements must match the number of rows.
Restriction: You cannot use the THRESHOLDMAX or THRESHOLDMIN axis options with the AXISCOMP statement.
See: For information about the axis options, see Axis Options.
COLUMNAXES

specifies the primary (bottom) axes for the columns:

Requirement: You must specify an ENDCOLUMNAXES statement to complete the COLUMNAXES statement block.
ROWAXES

specifies the primary (left) axes for the rows.

Requirement: You must specify an ENDROWAXES statement to complete the ROWAXES statement block.
Secondary Axes

AXISCOMP

specifies one or more axis options.

Requirement: The AXISCOMP statement must be used inside of a primary or secondary column or row axis statement block.
Requirement: You must specify at least one axis-option.
Requirement: Within a COLUMN2AXES statement block, the number of AXISCOMP statements must match the number of columns.
Requirement: Within a ROW2AXES statement block, the number of AXISCOMP statements must match the number of rows.
Restriction: You cannot use the THRESHOLDMAX or THRESHOLDMIN axis options with the AXISCOMP statement.
See: For information about the axis options, see Axis Options.
COLUMN2AXES

specifies the secondary (top) axes for the columns.

Requirement: You must specify an ENDCOLUMN2AXES statement to complete the COLUMN2AXES statement block.
ROW2AXES

specifies the secondary (right) axes for the rows.

Requirement: You must specify an ENDROW2AXES statement to complete the ROW2AXES statement block.

Example

The following example creates an axis and axis label for each column in the layout.

 Note about code
layout lattice / columns=2 columngutter=5 
                 hrange=union width=320px height=240px;
 Note about code
   columnaxes;
      axiscomp label="x";
      axiscomp label="x";
   endcolumnaxes;
 Note about code
   scatter x=x y=t;
   scatter x=x y=y;
 Note about code
endlayout;

Lattice Layout with an Axis and an Axis Label

[Lattice Layout with an Axis and an Axis Label]


Heading Statements


You can display one or more headings for the columns and rows in a lattice layout by using the heading statements . A heading can be specified by one or more ODS Graph statements.

COLUMNHEADER;
ODS-Graph-statement(s);
ENDCOLUMNHEADER;
ROWHEADER;
ODS-Graph-statement(s);
ENDROWHEADER;
COLUMN2HEADER;
ODS-Graph-statement(s);
ENDCOLUMN2HEADER;
ROW2HEADER;
ODS-Graph-statement(s);
ENDROW2HEADER;

Heading Statements Descriptions

Primary Headings

COLUMNHEADER

specifies a heading for the primary (top) column heading position.

Requirement: You must specify an ENDCOLUMNHEADER statement to complete the COLUMNHEADER statement block.
ODS-Graph-statement(s)

specifies one or more headings.

See: ODS Graph Statements.
ROWHEADER

specifies a heading for the primary (left) row heading position.

Requirement: You must specify an ENDROWHEADER statement to complete the ROWHEADER statement block.
Secondary Headings

COLUMN2HEADER

specifies a heading for the secondary (bottom) column heading position.

Requirement: You must specify an ENDCOLUMN2HEADER statement to complete the COLUMN2HEADER statement block.
ODS-Graph-statement(s)

specifies one or more headings.

See: ODS Graph Statements.
ROW2HEADER

specifies a heading for the secondary (right) column heading position.

Requirement: You must specify an ENDROW2HEADER statement to complete the ROW2HEADER statement block.

Example

The following example creates a column heading above the left column in a lattice layout.

 Note about code
layout lattice / columns=2 columngutter=5 
                 width=320px height=240px;
 Note about code
   columnheader;
      entry "Left Column";
   endcolumnheader;
 Note about code
   scatter x=x y=t;
   scatter x=x y=y;
 Note about code
endlayout;

Layout with Column Heading

[Layout with Column Heading]


Sidebar Statements


You can create a sidebar between a heading and an axis by using the sidebar statements. A sidebar spans across columns or rows and is useful for displaying information that applies to all of the columns or to all of the rows. A heading must be specified by one or more ODS Graph statements.

SIDEBAR </ ALIGN= TOP | BOTTOM | LEFT | RIGHT> ;
ODS-Graph-statement(s);
ENDSIDEBAR;

SIDEBAR Statements Descriptions

ODS-Graph-statement(s)

specifies the one or more sidebars.

See: ODS Graph Statements.
SIDEBAR

begins a SIDEBAR statement block. You can specify up to four SIDEBAR statement blocks in a LAYOUT LATTICE block, one for each of the top, bottom, left, and/or right sidebar positions.

Requirement: You must specify an ENDSIDEBAR statement to complete the SIDEBAR statement block.

Option

ALIGN= TOP | BOTTOM | LEFT | RIGHT

specifies the alignment of the sidebar.

Default: BOTTOM

Example

The following example creates a lattice layout with a top sidebar displayed in the layout.

 Note about code
layout lattice / columngutter=5 columns=2
                 width=320px height=240px;
 Note about code
   sidebar / align=top;
      layout gridded / border=true borderpattern=dot;
         entry "Top Sidebar" / valign=center;
      endlayout;
   endsidebar;
 Note about code
   scatter x=x y=t;
   scatter x=x y=y;
 Note about code
endlayout;

Lattice Layout with a Top Sidebar

[Lattice Layout with a Top Sidebar]


Previous Page | Next Page | Top of Page