I have this code within a macro and I needed to add an XAXISTABLE statement. Now the legend is clipped. What are my options?
proc sgplot data=PLOTDATA dattrmap=&attr;
series x=Month2 y=aval / group=CAT break transparency=0.2 lineattrs=(pattern=solid thickness = 2.0pt) markers markerattrs = (size= 6pt ) attrid = linecolors ;
xaxis offsetmin = 0.015 min = -1 fitpolicy = none values = (0 1 3 6 12 18 24 36 48 60 72 84 96) label = 'Month' labelattrs = (size = 7pt family = "Courier New")
valueattrs = (size = 7pt family = "Courier New");
yaxis values = (&low to &high by &by) label = "&¶m&i" grid labelattrs = (size = 7pt family = "Courier New") valueattrs = (size = 7pt family = "Courier New");
xaxistable n / class = cat valueattrs = (size = 7pt) labelattrs = (size = 7pt);
keylegend / type=marker title="" valueattrs = (size = 7pt family = "Courier New") noborder ;
run;
Does it help?
BR,
Koen
When you say "clipped", do you mean the legend is dropped, or the legend area is overwritten? If it is dropped, try increasing the LEGENDAREAMAX on the ODS GRAPHICS statement:
ods graphics / legendareamax=35; /* This means 35 percent */
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →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.