BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Greetings,

I'm trying to plot three variables using "plot y*x = z" syntax in proc gplot, where z is a numeric variable taking on 6 values (7,8,9,10,11, & 12). The following symbol statements appear before the proc gplot code:

symbol1 l=1 w=1 i=steplj v=none c=black;
symbol2 l=2 w=1 i=steplj v=none c=green;
symbol3 l=4 w=1 i=steplj v=none c=red;
symbol4 l=14 w=1 i=steplj v=none c=blue;
symbol5 l=34 w=1 i=steplj v=none c=gold;
symbol6 l=46 w=1 i=steplj v=none c=pink;
symbol7 l=10 w=1 i=steplj v=none c=cyan;

My problem is that only the first 4 symbol statements are being utilized. Symbol4 is repeated for the last three values of the z variable (10-12). The plot legend shows just four groups for the z variable: 7, 8, 9 as expected (with symbols 1-3, respectively); the 4th group is labeled "*" and is associated with symbol 4. In the plot, the 6 expected lines are plotted, but symbol4 is used for for z=10, 11, and 12. Why aren't symbol5 and symbol6 being used? Any insight would be greatly appreciated.

Thanks.
1 REPLY 1
deleted_user
Not applicable
Oh geez, never mind. I realize my error now. I had a format statement applied to the z variable which was grouping it into 4 categories. The code was embedded in a macro and was correct for most other calls. Sorry for the interruption.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1033 views
  • 0 likes
  • 1 in conversation