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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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