Hi all. I have data:
trtpn visit median q1 q3
1 2 0 0 0
2 2 0 0 0
3 2 0 0 0
1 3 2 1 4
2 3 1 -2 3
3 3 3 1 4
1 4 -2 -3 2
2 4 2 -1 3
3 4 2 -1 3
and i am using code below to plot median and interquartile:
proc sgplot data=mydata noautolegend;
styleattrs datasymbols=(circlefilled asterisk tranglefilled)
Datalinepatterns=(solid solid solid)
DATACONTRASTCOLORS=(blue green magenta);
series x=visitn y=median / group=trtpn groupdisplay=cluster clusterwidth=0.5;
scatter x=visitn y=median/yerrorlower=q1 yerrorupper=q3 group=trtpn groupdisplay=cluster clusterwidth=0.5 errorbarattrs=(thickness=1) markerattrs=(size=7) name='s';
xaxis values=(2,3,4) fitpolicy=rotate grid ;
yaxis grid values=(-80 to 20 by 20);
keylegend 's'/title="Treatment Group:" down=1 location=outside position=bottom noborder;
However, the color for plot is not as indicated in the DATACONTRASTCOLORS=(blue green magenta), but it plots everything in black. Does anyone knows how to change color?
Thank you!