Sample 24925: Order the legend entries using the ORDER= option on a LEGEND statement
/* Original data set */
data one;
input state $2. sales region $;
datalines;
CA 9 West
VA 5 South
OR 9 West
NC 5 South
NY 7 North
PA 3 East
NJ 7 North
MD 3 East
;
/* Define global statements, invoke macro LEG */
legend1 order=( 'West' 'South' 'North' 'East') label=none down=2;
symbol1 v=star c=cyan i=none;
symbol2 v=square c=black i=none;
symbol3 v=circle c=blue i=none;
symbol4 v=triangle c=red i=none;
axis1 minor=none;
/* Generate GPLOT */
proc gplot data=one;
plot sales*state=region /legend=legend1 haxis=axis1 vaxis=axis1;
run;
quit;
This sample uses the ORDER= option on a LEGEND statement to order the legend values that appear in the legend.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Legends
|
| Date Modified: | 2005-08-31 03:03:18 |
| Date Created: | 2004-11-11 11:08:01 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |