HTML Preview Graphics Template Language in SAS 9.2. page number 4.


SERIESPLOT X = _xvar Y = _yvar1 /
MARKERATTRS = (SIZE = 10PX)
LINEATTRS = (THICKNESS = 3PX)
NAME = 'series'
GROUP = _group
;
SCATTERPLOT X = _xvar Y = _yvar1 /
YERRORUPPER = _yupper1
YERRORLOWER = _ylower1
MARKERATTRS = (SIZE = 10PX)
GROUP = _group
;
Add horizontal reference lines, if requested:
IF (_yintercepta)
LINEPARM X = 0 Y = _yintercepta SLOPE = 0 / LINEATTRS = (PATTERN = DOT);
ENDIF;
IF (_YINTERCEPTB)
LINEPARM X = 0 Y = _yinterceptb SLOPE = 0 / LINEATTRS = (PATTERN = DOT);
ENDIF;
Add a legend for the connecting lines:
DISCRETELEGEND 'series' /
ACROSS = 4
BORDER = FALSE
VALIGN = TOP
;
ENDLAYOUT;
Define the bottom area and fill with a scatter plot of the counts as character values:
LAYOUT OVERLAY /
PAD = (BOTTOM = 2% LEFT = 2% RIGHT = 2%)
BORDER = FALSE
WALLDISPLAY = NONE
XAXISOPTS = (DISPLAY = NONE)
X2AXISOPTS = (DISPLAY = NONE)
Y2AXISOPTS = (DISPLAY = NONE)
YAXISOPTS = (DISPLAY = (TICKVALUES))
;
SCATTERPLOT X = _xvar Y = _group /
MARKERCHARACTERATTRS = (COLOR = BLACK)
MARKERCHARACTER = _nvar1
;
ENDLAYOUT;
ENDLAYOUT; /* lattice*/
Add the footnotes:
ENTRYFOOTNOTE HALIGN = LEFT _footnote;
ENTRYFOOTNOTE HALIGN = LEFT _footnote2;
ENTRYFOOTNOTE HALIGN = LEFT _footnote3;
ENDGRAPH;
END;
RUN;
CREATE THE PLOT
Generate the graph, requesting the horizontal reference lines:
%LET pgm=v92_ods_lineplot;
OPTIONS NODATE NONUMBER ORIENTATION = LANDSCAPE;
/*--- Figure 2: Plot CHAIR as line plot with reference lines ---*/
TITLE ' ';
ODS RTF FILE = "&pgm._chair.rtf" STYLE = serifprinter;
ODS GRAPHICS ON;
4
Re
p
ortin
g
and Information Visualization
SAS Global Forum 200
9
DOWNLOAD HERE


Business is more exciting than any game. | Lord Beaverbrook