Proc GPLOT graphs one variable against another. Capability of
plotting two different variables on vertical axis with the same
horizontal variable and range. Flexibility in axis labeling, tick
marks and scaling as well as interpolation and presentation
options.
Format:
PROC GPLOT options;
gplot_statement(s);
RUN;
Note: The general statements TITLE, FOOTNOTE,
NOTE, SYMBOL and PATTERN are usually written just before the
procedure is invoked. Particular attention should be paid to the
interpolation option (I), the plot character (V) and the line type
(L) in the SYMBOL statement. The GPLOT options:
DATA = dataset_name
GOUT = graphicscatalog
ANNOTATE or ANNO = SASdataset
UNIFORM
The associated statements:
PLOT yvar * xvar ... / options;
PLOT2 yvar * xvar ... / options;
BUBBLE yvar * xvar = zvar / options;
BUBBLE2 yvar * xvar = zvar / options;
BY variables;
e.g.,
PROC GPLOT DATA=TESTPTS GOUT=PLOTCAT;
PLOT y * x y1 * x / OVERLAY;
PLOT2 y2 * x y3 * x / OVERLAY;
PLOT and PLOT2 statement options:
- OVERLAY
- Place all the plots requested on one set of axes.
The scale is automatically reajusted.
- SKIPMISS
- Create a gap in the simple JOIN line at
occurences of missing values.
- LEGEND=LEGENDn
- Specifies the LEGEND statement associated with
the plot. LEGENDn is defined previously.
- NOLEGEND
- Suppress printing of the legend for plot request
of the form Yvar * Xvar = Zvar. (see Guide p. 74)
- ANNOTATE=SASdataset
- Specifies the input data set for annotation
Options to draw lines on the plot (p 282):
- HREF=values
- VREF=values
- Specifies where the lines will be
drawn (e.g HREF=5)
- CVREF=color
- CV=color
- Specifies color for requested vertical lines by
VREF (see avail. colors p. 20-28)
- CHREF=color
- CH=color
- Specifies color for requested horizontal lines by
HREF (see avail. colors p. 20-28)
- LHREF=linetype
- LH=linetype
- linetype for requested horizontal
lines by HREF (see avail. linetypes p. 63)
- LVREF=linetype
- LV=linetype
-
- linetype for requested vertical lines by VREF
(see avail. linetypes p. 63)
Options to define axis (p 283):
- VAXIS=values
- HAXIS=values
- Specify the major tic marks on an
axis and the range of values to be included in the
plot (e.g. VAXIS = 10 TO 100 BY 10 or VAXIS = 10, 20,
30, 40 )
- VAXIS=AXISm
- HAXIS=AXISn
- (see AXIS statement p. 71-74)
- VMINOR=n
- HMINOR=n
- number of minor tick marks on vertcal/horizontal
axis
- VZERO
- HZERO
- Specifies that the axis begins at zero, even if
not in range.
- VREVERSE
- values on the vertical axis reversed
- NOAXES
- suppress drawing of the axes lines and labels
- FRAME
- axis area outline in the color of the axis
- CFRAME=color
- color to fill the axis area
(implies FRAME)
- CAXIS=color
- color used for the axis (2nd of
color list is the default)
- CTEXT=color
- color for printing text and ticks
on the axis (2nd of color list is the default)
- ANNOTATE=SASdataset
- specifies input data for graphic annotation
BUBBLE and BUBBLE2 statements
Draws a circle whose size
represents the value of a third variable. Some of the options are:
BLABEL, BSCALE, BSIZE, BFONT, BCOLOR.
[SAS/GRAPH User's Guide
pg. 385-6
]
Prepared by
Michael Friendly
Email<friendly@yorku.ca>
Previous Document.
Next Document.