SAS Institute. The Power to Know

SAS/GRAPH(R) 9.2: Graph Template Language Reference

Previous | Next
LAYOUT LATTICE Statement

Cell Contents

The content of each cell in a LAYOUT LATTICE is specified by statgraph-statement(s) that can be specified independently or enclosed in a CELL block. When you enclose the statements in a CELL block, you can specify one or more header lines at the top of the cell. If you do not need a cell header in a cell, there is no need to use the CELL block.

The following general syntax is used for the contents of each cell in a LAYOUT LATTICE:

      statgraph-statement(s) | cell-statement-block(s)

A cell-statement-block , when used, has the following syntax:

CELL ;

           < CELLHEADER;

                    statgraph-statement(s) ;

           ENDCELLHEADER; >

          statgraph-statement(s) ;

ENDCELL ;
  • The contents of each cell is generated by statgraph-statement(s) that can be specified independently or enclosed in a CELL block.
  • Whether specified independently or enclosed in a CELL block, the statgraph-statement(s) can include text statements, plot statements, or layout statements.
  • Within a CELL block, a CELLHEADER block can be used to generate one or more header lines within the cell. Each header line is specified on a separate statgraph-statement within the CELLHEADER block. The header block is typically used to specify one or more text statements, but other statements are allowed within the block. For example, you could specify a LAYOUT GRIDDED statement to produce a grid of text for the header
  • Only one CELLHEADER block can used per CELL block. If more than one is specified, only the last one is used.
  • If a CELLHEADER block is not specified in a CELL block, the enclosed statgraph-statement(s) produce the same results they would produce if they were specified independently.

The following example shows a LAYOUT LATTICE block that uses one statgraph-statement and one cell-statement-block to generate the two-column layout shown in the following figure:


latticecellcontents image


  
 begingraph; 
   layout lattice / 
     columngutter=5 columns=2; 
  
  /* independent plot statement - defines first cell */ 
     scatterplot x=age y=height; 
  
  /* cell block - defines second cell */ 
     cell; 
       cellheader; 
         entry "Cell Header" / border =true; 
       endcellheader; 
  
       scatterplot x=weight y=height; 
  
     endcell; 
   endlayout; 
 endgraph;
 

Previous | Next | Top of Page