-
Notifications
You must be signed in to change notification settings - Fork 5
High value Statements and Options
There are over 30 different plot statements in SGPLOT, each with as many as 40 different options per plot type, not to mention the non-plot statements and their options. The volume of information can be overwhelming. This page attempts to identify the high-value statements and options. Familiarize yourself with this content first, and once you've got your head wrapped around this, then you can start poking around in the online documentation.
Credit: the below image were copied with permission from the excellent SGF 2015 paper Graphing Made Easy with SGPLOT and SGPANEL Procedures.
SCATTER X=variable Y=variable / GROUP=variable;
SERIES X=variable Y=variable / GROUP=variable;
STEP X=variable Y=variable / GROUP=variable;
To modify marker and line attributes for non-grouped data, use these options:
MARKERATTRS=(COLOR=color SYMBOL=symbol SIZE=size)
LINEATTRS=(COLOR=color PATTERN=pattern THICKNESS=thickness)
On the other hand, if you wish to group your data:
GROUP=variable
Then use the %modstyle
macro to change your marker and line attributes.
%modstyle(markers=list of shapes, linestyles=list of patterns, colors=*list of colors", etc.);
YAXIS LABEL="text" VALUE=(values) TYPE=type;
REFLINE variable|value / AXIS=X|Y;
KEYLEGEND / NOBORDER TITLE="text" LOCATION=inside|outside POSITION=bottom|bottomleft|...|topright;
Next page: Means over Time