- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I just finished converting my program to use SGPLOT rather than GPLOT to do this plot. What a relief!
There's one last thing that I have not yet figured out yet. The vertical bars that mark the lower and upper standard error at each timepoint come out black. I am able to customize the color of everything else. Is there a way to do that? I found a long list of __ATTRS in the documentation, but not sure if any of them apply to this horizontal bar.
I followed the example from here (you can see the horizontal bar in the "results" tab):
http://support.sas.com/kb/42/542.html
And then added on in my program:
proc sgplot data = adttr4;
** -- Uberdrug -- **;
scatter x=avisitn y=mean1 / name = "scatter1" yerrorlower=lower1
yerrorupper=upper1
markerattrs=(color=green symbol=CircleFilled);
series x=avisitn y=mean1 / lineattrs=(color=green pattern=1);
** -- Placebo ----- **;
scatter x=avisitn y=mean2 / name = "scatter2" yerrorlower=lower2
yerrorupper=upper2
markerattrs=(color=blue symbol=CircleFilled);
series x=avisitn y=mean2 / lineattrs=(color=blue pattern=2);
xaxis values = (28 91 183 274 365)
valuesdisplay = ('Day 28 Pre-dose' 'Month 3' 'Month6' 'Month 9' 'Month 12')
label = 'Timepoint'
labelattrs = (family = "courier new" size = 8.9 pt color = black)
offsetmin = .09 offsetmax = .09;
yaxis values = (27 28 29 30 31 32)
label = 'Mean Serum TTR (mg/dL) +/- 1 Standard Error'
labelattrs = (family = "courier new" size = 8.9 pt color = black);
legenditem type=marker name = "A" /
markerattrs=(color=green symbol=CircleFilled)
label="Uberdrug"
lineattrs=GraphData1
markerattrs=Graphdata1;
legenditem type=marker name = "P" /
markerattrs=(color=blue symbol=CircleFilled)
label="Placebo"
lineattrs=GraphData1
markerattrs=Graphdata1;
keylegend "A" "P" / title = "Treatment";
run;
Thank you in advance...
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The ERRORBARATTRS option on the SCATTER plot should give you what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The ERRORBARATTRS option on the SCATTER plot should give you what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Wow! I didn't notice that one. Thank you so much. I will fix and then mark your reply as the solution.
Thank you...