Desktop productivity for business analysts and programmers

COlor of grouped SGPLOT without DATTRMAP

Reply
Frequent Contributor
Posts: 89

COlor of grouped SGPLOT without DATTRMAP

I have a SAS EG 4.3 and I guess it does not include DATTRMAP to change colors of grouped scatterplots. Is there any other way to choose colors for grouped graphs without this function ?

PROC Star
Posts: 1,400

Re: COlor of grouped SGPLOT without DATTRMAP

Use the DATACONTRASTCOLORS= Option in the STYLEATTRS Statement like this

 

proc sgplot data=sashelp.iris noautolegend;
   styleattrs datasymbols=(circlefilled) datacontrcolors=(red yellow green);
   scatter x=sepallength y=sepalwidth / group=species;
   keylegend / location=inside position=NE across=1;
run;

 

Frequent Contributor
Posts: 89

Re: COlor of grouped SGPLOT without DATTRMAP

Yea, styleattrs don't work for me either. I guess I can't do it on this version of SAS. Thank you, though
Ask a Question
Discussion stats
  • 2 replies
  • 57 views
  • 1 like
  • 2 in conversation