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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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