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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1295 views
  • 0 likes
  • 1 in conversation