BookmarkSubscribeRSS Feed
_Hopper
Quartz | Level 8

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 = "&&param&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;

 

2 REPLIES 2
sbxkoenk
SAS Super FREQ
  • Sure you want to work with Courier New? It's a monospace font (exact same horizontal width for every character - like "i" and "w"). Working with a proportional font might save some space.
  • Increase the size of the graph using the HEIGHT= and/or WIDTH= option in the ODS GRAPHICS statement.
  • Use the MAXLEGENDAREA= option in the ODS GRAPHICS statement to increase the space available for the legend.

Does it help?

 

BR,

Koen

DanH_sas
SAS Super FREQ

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 */

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 157 views
  • 0 likes
  • 3 in conversation