BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Gbenga
Calcite | Level 5

I am trying to assign different symbols to each Temp but I couldn't find a means to do it.

I have 4 temp levels;

This is my code.

 

proc sgpanel data=EECreduced ;
panelby MC / spacing=5 novarname ;
vline day/ response= ECC group=Temp stat=mean markers limitstat=stddev markerattrs=(symbol=plus size=3) ;
run;

 

My thinking

from markerattrs= (symbols= plus..) (I should be able to add another code to pick the first temp for plus, second temp arrow down ..etc

I attached s sample plot fr your perusal

Thanks

 

 


pictures.JPG
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

I would suggest raising the issue with SAS Support team as the example in the blog post does not work for me using SAs 9.4.

Perhaps they changed something in 9.4?

If you run this code the same symbol is used for both lines which looks like the issue you are seeing.

proc sgplot data= sashelp.class;
  title 'Using the STYLEATTRS statement in SAS 9.4';
  styleattrs 
   datacontrastcolors=(orange purple)
   datalinepatterns=(1) 
   datasymbols=(circlefilled trianglefilled)
  ;
  reg x=weight y=height / group=sex degree=3;
run;

But the SAS log has a note about using the ATTRPRIORITY setting.

So adding this line before the PROC SGPLOT makes it work.

ods graphics / attrpriority=none;

 

View solution in original post

3 REPLIES 3
Gbenga
Calcite | Level 5

Thank you so much for your very helpful response. I appreciate it so much!!.

 

I am using sas studio online at home and sas 9.4 in school.

 

My response is based on the sas studio online

I modified the code as follows

proc sgpanel data=EECreduced ;
styleattrs datacontrastcolors=(orange black green red) datalinepatterns=(1)
datasymbols=(circlefilled trianglefilled rectanglefilled sqaurefilled);
panelby MC / spacing=5 novarname ;
vline day/ response= ECC group=Temp stat=mean markers limitstat=stddev ;
run;

Summary

The colour of each line changed but the symbols remain.

Please see attached 

Thank you


picture2.JPG
Tom
Super User Tom
Super User

I would suggest raising the issue with SAS Support team as the example in the blog post does not work for me using SAs 9.4.

Perhaps they changed something in 9.4?

If you run this code the same symbol is used for both lines which looks like the issue you are seeing.

proc sgplot data= sashelp.class;
  title 'Using the STYLEATTRS statement in SAS 9.4';
  styleattrs 
   datacontrastcolors=(orange purple)
   datalinepatterns=(1) 
   datasymbols=(circlefilled trianglefilled)
  ;
  reg x=weight y=height / group=sex degree=3;
run;

But the SAS log has a note about using the ATTRPRIORITY setting.

So adding this line before the PROC SGPLOT makes it work.

ods graphics / attrpriority=none;

 

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
  • 3 replies
  • 2001 views
  • 1 like
  • 3 in conversation