SAS Institute. The Power to Know

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

Previous | Next
LAYOUT DATAPANEL Statement

Sidebar Blocks

A LAYOUT DATAPANEL enables you to display sidebars outside of the axis areas. A sidebar spans across columns or rows and is useful for displaying information that applies to all of the columns or all of the rows. For example, sidebars are useful for displaying a legend.

A SIDEBAR statement has the following syntax:

SIDEBAR / ALIGN= BOTTOM | TOP | LEFT | RIGHT;

           statgraph-statement(s) ;

ENDSIDEBAR ;
  • ALIGN=BOTTOM is the default alignment.
  • You can specify up to four SIDEBAR blocks in a LAYOUT DATAPANEL, one for each of the bottom, top, left, and right sidebar positions.
  • The LAYOUT DATAPANEL automatically aligns a sidebar with the layout columns or rows.
  • Only one statement (such as ENTRY or DISCRETELEGEND) or one layout block (such as LAYOUT GRIDDED) is allowed in a SIDEBAR block. To create multi-line text in a sidebar, nest ENTRY statements within a LAYOUT GRIDDED block.

The following example shows a SIDEBAR block that displays a legend at the top of the layout grid.

  
   sidebar / align=top; 
     discretelegend 'p' 'a' / across=2; 
   endsidebar;
 

Previous | Next | Top of Page