Hi,
I'm trying to a sgplot in SAS9.4 which overlays 16 different kernel densities. Although all kernels are plotted, once it gets beyond 10 colours/line types the lines are all drawn with the same properties. Does anyone know if there is a maximum number of attributes for overlaid kernels? Code below if that helps.
Thank you in advance!
proc sgplot data=graph;
%do q=1 %to &n;
%if &&count&q >0 %then %do;
density &&type.&q / type=kernel name="&q" legendlabel="&&class&q (n=&&count&q)";
%end;
%end;
keylegend / location=outside position=bottom";
refline 0 / axis=x label="No Change" labelloc=inside labelpos=min lineattrs=(color=black pattern=ShortDash);
xaxis label="&typelabel ¶mlabel";
yaxis label='Density';
run;
Try setting the CYCLEATTRS option on the SGPLOT statement and see if you get better attribute variations:
proc sgplot data=graph cycleattrs;
Hope this helps!
Dan
Try setting the CYCLEATTRS option on the SGPLOT statement and see if you get better attribute variations:
proc sgplot data=graph cycleattrs;
Hope this helps!
Dan
Dan - you have just saved me from another couple of hours banging my head against a brick wall. Thank you!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.