| TEMPLATE Procedure: Layout Statements (Experimental) |
LAYOUT LATTICE </ option(s)>
;
|
| ENDLAYOUT; |
| Usage Information |
Parts of a Lattice Layout
![[Parts of a Lattice Layout]](./images/layout-lattice.gif)
The cell content statement creates one or more heading lines at the top of a cell.
The ODS Graph statements can specify the contents of a single cell, headings, and/or sidebars.
The axis statements display axes and axis labels for the primary (bottom and left) axis columns and rows and the secondary (right and top) axis columns and rows in a lattice layout.
The heading statements display headings for the primary (bottom and left) axis columns and rows and the secondary (right and top) axis columns and rows in a lattice layout.
The sidebar statements display a sidebar between a heading and an axis.
| Requirement: |
You must specify an ENDLAYOUT statement to complete the LAYOUT LATTICE block. |
| Default |
The LAYOUT LATTICE statement automatically aligns the following:
|
| 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: |
| 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. |
specifies the background color of the graph.
| Default: | Specified by the GraphBackground:Background style reference. |
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 |
displays the border around the layout.
| Default: | TRUE for the outermost LAYOUT statement. FALSE for nested LAYOUT statements. |
specifies the border color of the layout.
| Default: | Specified by the GraphBorderLines:Foreground style reference. |
specifies the line pattern of the layout border.
| Default: | Specified by the GraphBorderLines:LineStyle style reference. |
specifies the border thickness of the layout.
| Default: | 1 px |
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. |
specifies the number of columns in the layout.
| Default: | 1 |
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. |
specifies the height of the layout area.
| Restriction: | You can only specify the HEIGHT= option on the outermost LAYOUT statement. |
specifies the horizontal data ranges of graphs within the layout.
scales the horizontal data ranges separately for each cell in the layout.
scales the data ranges separately for each column in the layout.
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. |
specifies whether cells are filled by columns or by rows.
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. |
fills the cells by rows, from left to right.
| Default: | ROWMAJOR |
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. |
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. |
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. |
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. |
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. |
specifies the number of rows in the layout.
| Default: | 1 |
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. |
specifies the vertical data ranges of graphs within the layout.
scales the vertical data ranges separately for each cell in the layout.
scales the data ranges separately for each row in the layout.
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. |
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;
|
| ODS-Graph-statement(s); |
| ENDCELL; |
| CELL Content Statements Descriptions |
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. |
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. |
generates the content of a single cell.
| See: | ODS Graph Statements. |
| Example |
The following example creates a two column layout with one cell heading.
| |
layout lattice / columns=2 columngutter=5
width=320px height=240px; |
| |
scatter x=x y=t; |
| |
cell;
cellheader;
entry "Cell Heading" / border=true;
endcellheader;
scatter x=x y=y;
endcell; |
| |
endlayout; |
Two Column Layout with One Cell Heading
![[Two Column Layout with One Cell Heading]](./images/latticecellcontents.gif)
| Axis Statements |
You can display axes and axis labels for the columns and rows in a layout by using the axis statements.
COLUMNAXES;
|
| ENDCOLUMNAXES; |
ROWAXES;
|
| ENDROWAXES; |
COLUMN2AXES;
|
| ENDCOLUMN2AXES; |
ROW2AXES;
|
| ENDROW2AXES; |
| Axis Statements Descriptions |
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. |
specifies the primary (bottom) axes for the columns:
| Requirement: | You must specify an ENDCOLUMNAXES statement to complete the COLUMNAXES statement block. |
specifies the primary (left) axes for the rows.
| Requirement: | You must specify an ENDROWAXES statement to complete the ROWAXES statement block. |
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. |
specifies the secondary (top) axes for the columns.
| Requirement: | You must specify an ENDCOLUMN2AXES statement to complete the COLUMN2AXES statement block. |
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.
| |
layout lattice / columns=2 columngutter=5
hrange=union width=320px height=240px; |
| |
columnaxes;
axiscomp label="x";
axiscomp label="x";
endcolumnaxes; |
| |
scatter x=x y=t; scatter x=x y=y; |
| |
endlayout; |
Lattice Layout with an Axis and an Axis Label
![[Lattice Layout with an Axis and an Axis Label]](./images/latticeaxes.gif)
| 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;
|
| ENDCOLUMNHEADER; |
ROWHEADER;
|
| ENDROWHEADER; |
COLUMN2HEADER;
|
| ENDCOLUMN2HEADER; |
ROW2HEADER;
|
| ENDROW2HEADER; |
| Heading Statements Descriptions |
specifies a heading for the primary (top) column heading position.
| Requirement: | You must specify an ENDCOLUMNHEADER statement to complete the COLUMNHEADER statement block. |
specifies one or more headings.
| See: | ODS Graph Statements. |
specifies a heading for the primary (left) row heading position.
| Requirement: | You must specify an ENDROWHEADER statement to complete the ROWHEADER statement block. |
specifies a heading for the secondary (bottom) column heading position.
| Requirement: | You must specify an ENDCOLUMN2HEADER statement to complete the COLUMN2HEADER statement block. |
specifies one or more headings.
| See: | ODS Graph Statements. |
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.
| |
layout lattice / columns=2 columngutter=5
width=320px height=240px; |
| |
columnheader;
entry "Left Column";
endcolumnheader; |
| |
scatter x=x y=t; scatter x=x y=y; |
| |
endlayout; |
Layout with Column Heading
![[Layout with Column Heading]](./images/latticeheaders.gif)
| 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> ;
|
| ENDSIDEBAR; |
| SIDEBAR Statements Descriptions |
specifies the one or more sidebars.
| See: | ODS Graph Statements. |
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 |
specifies the alignment of the sidebar.
| Default: | BOTTOM |
| Example |
The following example creates a lattice layout with a top sidebar displayed in the layout.
| |
layout lattice / columngutter=5 columns=2
width=320px height=240px; |
| |
sidebar / align=top;
layout gridded / border=true borderpattern=dot;
entry "Top Sidebar" / valign=center;
endlayout;
endsidebar; |
| |
scatter x=x y=t; scatter x=x y=y; |
| |
endlayout; |
Lattice Layout with a Top Sidebar
![[Lattice Layout with a Top Sidebar]](./images/latticesidebar.gif)