SAS Institute. The Power to Know

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

Previous | Next
Overview

The OVERLAY Layout

The OVERLAY layout "stacks" plots in the order you declare them, placing the first specified plot on the bottom of the stack. This layout integrates plots into a single plot area with shared axes and manages the integration details.

The stacking order is significant and often determines the sequence of plot statements in your template. For example, to generate a filled prediction ellipse and a scatterplot, you would specify the ellipse first and then the scatterplot so that the scatterplot's marker symbols will be superimposed over the ellipse. If you were to specify the scatterplot first, the ellipse would be overlaid on top of it and obscure the marker symbols.

The following example generates a prediction ellipse and a scatterplot. In this example, the X and Y data ranges for the ellipse are larger than the data ranges for the scatter plot. Thus, the OVERLAY layout automatically adjusts the range for each axis.

  
 proc template; 
   define statgraph scatteroverlay; 
     begingraph; 
       layout overlay; 
        ellipse x=height y=weight / 
                alpha=.01 type=predicted display=(fill); 
        scatterplot x=height y=weight; 
       endlayout; 
     endgraph; 
   end; 
 run; 
  
 proc sgrender data=sashelp.class 
               template=scatteroverlay; 
 run;
 
ovoverlay.gif (35836 bytes)


Previous | Next | Top of Page