- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am trying to generate a figure plot using the below code. I am getting the output as in the attached screen shot.
proc sgpanel data=have ;
panelby SUBJID / layout=PANEL novarname columns=4 rows=2;
series x=x_axis_var y=aval /group=trt01p_ lineattrs=(pattern=mediumdash thickness=2);
scatter x=x_axis_var y=aval /group=trt01p_ markerattrs = (symbol=circlefilled size=8);
rowaxis integer grid values=(0,50,75,100) label="test";
colaxis integer grid values=(1 to 10 by 1) discreteorder=data label="Day";
run;
quit;
My query is how can we change the Blue color plots 'Green', Red color plots to 'Blue' and the bottom Legend with Green and Blue colors?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The colors and order by default come from the current style you have.
You can override the order and colors with a STYLEATTRS statement.
Since you are using lines and markers the specific element you want to override is the DATACONTRASTCOLORS.
Try adding:
styleattrs datacontrastcolors=(green blue);
The first group value encountered should get green lines and markers and the second would be blue. If the order isn't as desired then switch them in the statement. Note that the third or other group values will still have the default colors.
If you want to modify the colors slightly you can use words like bright, dark, light (and a few more) such as darkgreen brightblue.
Or investigate all of the color naming schemes SAS uses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The colors and order by default come from the current style you have.
You can override the order and colors with a STYLEATTRS statement.
Since you are using lines and markers the specific element you want to override is the DATACONTRASTCOLORS.
Try adding:
styleattrs datacontrastcolors=(green blue);
The first group value encountered should get green lines and markers and the second would be blue. If the order isn't as desired then switch them in the statement. Note that the third or other group values will still have the default colors.
If you want to modify the colors slightly you can use words like bright, dark, light (and a few more) such as darkgreen brightblue.
Or investigate all of the color naming schemes SAS uses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content