BookmarkSubscribeRSS Feed
viollete
Calcite | Level 5

Hi,

 

I have this type of data:

 

Year  Trust  Weekend Rate Lower_95 Upper_95

2008 1 1 8.4 7.9 8.6

2008 1 0 7.4 6.9 7.6

.....

2008 2 1 9.4 7.1 10.6

2008 2 0 8.4 7.9 8.6

......

 

I want to plot rate (with 95% CI) by year grouped by weekend, different graph for each trust. I used this code:

 

proc sgpanel data=rate;

panelby trust/rows=3 novarname spacing=5;

colaxis min=2008 max=2014;

rowaxis min=0 max=15;

scatter y=rate x=year/group=weekend yerrorlower=lower_95 yerrorupper=upper_95;

series y=rate x=year/group=weekend;

run;

quit;

 

I would like to change line attributes and markers attributes, how can I do it? Is there any other way to draw similar graph?

 

Thanks

 

 

 

 

1 REPLY 1
Rick_SAS
SAS Super FREQ

Look into the HIGHLOW statement, which supports the LINEATTRS= option for specifying the line attributes.

You can use the HIGHLOW statement to plot the error bars, then use the SCATTER statement and the MARKERATTRS= option to overlay the estimate in the middle.

 

 You don't say HOW you want to change the attributes, but you might be interested in this article about how to set the marker and line attributes by using ODS style elements.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1159 views
  • 0 likes
  • 2 in conversation