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!
SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.
Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!
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.