- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi group,
I'm having trouble with some of the style attributes in SGPLOT. I am trying to customize a regression plot with 2 groups, that includes confidence bands/ limits. I have been able to get the figure very close to how I'd like it, however, one of my regression lines is missing a confidence band (that was there when I had all the default options).
Here is my code:
ods html style=Journal;
proc sgplot data=Haley_July;
styleattrs datacontrastcolors=(black grey)
datasymbols=(circle triangle)
datalinepatterns=(solid);
reg y=r4 x=yolk_mom/group=season CLM CLI;
xaxis label= 'Maternal Yolk Allocation';
yaxis label= 'Yolk Conversion Efficiency';run;quit
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't think there is anything intrinsically wrong with your plot statement. Run the following and see if you can see both CLM regions:
ods html style=Journal;
proc sgplot data=sashelp.class;
styleattrs datacontrastcolors=(black grey)
datasymbols=(circle triangle)
datalinepatterns=(solid);
reg y=weight x=height/group=sex CLM CLI;
run;
One thing to be aware of, when you set the line color to grey, it might not show up against the CLM. You might want to use
datacontrastcolors=(grey lightgrey)
or some similar choice.
Maybe the missing CLM is white? To help "find" the missing CLM, try (temporarily) adding
wallcolor=lightpink
to the STYLEATTRS statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
... I'm not actually sure how to change the confidence band color from white. Suggestions?
Thank you!
-Amanda
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you edit the journal style?
Use
proc template;
list styles.journal;
run;
to determine if you are running the "official" style in SASHELP.TMPLMST or whether you are running a private copy.
There are also the Journal1a, Journal2, Journal2a, Journal3, and Journal3a styles.
I'm going to move this to the Graphics Community where more style experts can weigh in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It looks like I edited the style.journal by accident-- can I restore the default sytle.journal?
Best,
Amanda
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You could try other style like HTMLBLUE.and change color of clm .
ods html style=htmlblue;
proc sgplot data=sashelp.class;
styleattrs datacontrastcolors=(black grey)
datasymbols=(circle triangle)
datalinepatterns=(solid);
reg y=weight x=height/group=sex CLM CLI clmattrs=(color=blue);
run;