I heard that show='ATTRMAP' will show the missing group in the legend. I tried the following code but it is not working. Can anyone help ? thanks.
input Value $ n;
retain ID 'A' Show 'AttrMap';
FillStyle = cats('GraphData', n);
LineStyle = cats('GraphData', n);
MarkerStyle = cats('GraphData', n);
TextStyleElement = cats('GraphData', n);
if sex='F' then delete;
ods listing close;
ods rtf file='c:\mytest.rtf';
proc sgplot data=test dattrmap=order ;
scatter x =height y = weight / group=sex attrid=A name="sct";
keylegend "sct" / noborder position=bottom ;
ods rtf close;
show is a variable in dataset order.
it has the value "ATTRMAP'.
When later attrmap=order is used in scatter plot, it should display the missing group in the legend.
that is what I am expecting . However, the missing group is not in lengend.
Registration is open! SAS is returning 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. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.