• Print  |
  • Feedback  |

TEMPLATE Procedure: Layout Statements (Experimental)

Layout Statements and the TEMPLATE Procedure


Ignored Plot Options in a LAYOUT OVERLAY Block

A LAYOUT OVERLAY block enables you to overlay multiple plots within a single layout area. For example, the following figure shows a scatter plot and a line that have been specified within a LAYOUT OVERLAY block.

Scatter Plot Overlaid with a Line

[Scatter Plot Overlaid with a Line]

All plots within a LAYOUT OVERLAY block share the axes and other graph features that are common within the layout area, such as the graph background and wall.

To prevent multiple plots from specifying conflicting values within a LAYOUT OVERLAY block, the LAYOUT OVERLAY statement controls the graph features that are common within the layout area. If individual plot statements specify values for any of these features, the values are ignored.

For example, in the following LAYOUT OVERLAY block, the SCATTERPLOT statement uses the BACKGROUND= option to specify a blue background.

LAYOUT OVERLAY;
		SCATTERPLOT Y=Height X=Weight
    / BACKGROUND=BLUE;
		LINEPARM YINTERCEPT=Intercept SLOPE=Slope;
ENDLAYOUT;

Because the background color is shared by all plots within the layout area, the BACKGROUND= value on the SCATTERPLOT statement is ignored, and the LAYOUT OVERLAY statement controls the background color. In this example, the LAYOUT OVERLAY statement does not explicitly specify a background color, so the default background color is used.

Although the LAYOUT OVERLAY statement controls the common graph features, the individual plot statements retain control of the features that are specifically related to their own data. For example, in the following LAYOUT OVERLAY block, the LINEPARM statement uses the DATATRANSPARENCY= option to specify a level of transparency for the line.

LAYOUT OVERLAY;
		SCATTERPLOT Y=Weight X=Height;
		LINEPARM YINTERCEPT=Intercept SLOPE=Slope
    / DATATRANSPARENCY=0.5;
ENDLAYOUT;

Because the line transparency value does not affect any of the common graph features that the LINEPARM shares with the SCATTERPLOT, the DATATRANSPARENCY= value on the LINEPARM statement is honored in the graph.

A more complicated case within a LAYOUT OVERLAY block is the use of the TRANSPARENCY= option. For most plots, the TRANSPARENCY= option specifies both the common features and the features that are specific to the plot. For example, the following SCATTERPLOT statement specifies a transparency value of 0.2.

LAYOUT OVERLAY;
		SCATTERPLOT Y=Weight X=Height
    / TRANSPARENCY=0.2;
		LINEPARM YINTERCEPT=Intercept SLOPE=Slope;
ENDLAYOUT;

On the SCATTERPLOT statement, the TRANSPARENCY= option specifies the level of transparency for the scatter plot markers, marker labels, background, grid lines, wall, and axis features. However, within a LAYOUT OVERLAY block, the background, grid lines, wall, and axis features are common features that are controlled by the LAYOUT OVERLAY statement, so the TRANSPARENCY= value specified by the SCATTERPLOT statement will be ignored for these common features. Nevertheless, the TRANSPARENCY= value is honored for the scatter plot markers and their labels (when present) because these features of the data elements are specific to the scatter plot.

For information about which statement options are ignored within a LAYOUT OVERLAY block, see the reference documentation for each plot statement.


Gridded Layouts


Specifying the Location of Columns and Rows

By default, layout cells are filled sequentially across the rows or down the columns. By specifying the COLUMN= option on the LAYOUT GRIDDED statement, you can specify an alternate column order for filling cells. By specifying the ROW= option on the LAYOUT GRIDDED statement, you can specify an alternate row order for filling cells.

If there are multiple rows in the layout, you can specify the COLUMN= option in conjunction with the ROW= option to specify the order of the rows. For example, you can create a four cell grid with two columns and two rows by using the following statement:

LAYOUT GRIDDED COLUMN=(2 1 1 2) ROW=(2 1 2 1);

This statement specifies that the column row coordinates are 2-2, 1-1, 1-2, and 2-1. These coordinates fill cells in the following order:

Specified Fill Order for Cells

[Specified Fill Order for Cells]


Spanning Columns

By default, each cell in the layout spans a single column and a single row. The COLUMNSPAN= option enables you to specify an alternative column span. For example, you can create a four cell grid with two columns and two rows, by using the following statement:

 LAYOUT GRIDDED COLUMNSPAN=(2 1 1);

This statement specifies that the first cell should span 2 columns and the next two cells should span 1 column each.

4 Cell Grid with 2 Columns and 2 Rows

[4 Cell Grid with 2 Columns and 2 Rows]


Spanning Rows

By default, each cell in the layout spans a single column and a single row. The ROWSPAN= option enables you to specify an alternative row span. For example, you can create a four cell grid with two columns and two rows, by using the following statement:

layout gridded rowspan=(2 1 1);

This statement specifies that the first cell should span 2 rows and the next two cells should span 1 row each.

4 Cell Grid with 2 Columns and 2 Rows

[4 Cell Grid with 2 Columns and 2 Rows]


Lattice Layouts


Examining a Lattice Layout

The following figure represents the parts of a layout.

Lattice Layout Components

[Lattice Layout Components]


Previous Page | Next Page | Top of Page