BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.


I'm running a SAS procedure (it's PROC TRANSREG, but I suspect this is probably incidental to the question) which generates a number of charts, which I'm plotting in ODS graphics.  One of those charts has a key at the bottom, which lists the input variables to the procedure.  The number of inputs is however variable, and if I include more than three of them, the key disappears - I'm assuming because there isn't enough room to include it in the plot.  I need to get that key back.  Does anyone know if the size of a chart might determine whether or not a key is included, and if so, whether increasing the size of the chart would be expected to allow the key to be included?  And if so, how do I increase the size of a chart created with ODS graphics?

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

Use the MAXLEGENDAREA option on the ODS GRAPHICS statement to increase the area allowed for the legend (or Key).  Default is 20 (%).  You can increase that to 40 or higher if you want.

  ods graphics / maxlegendarea=40;

Yes, increasing the size will also help, but then all the graphs from one procedure will become bigger (until you can change back the graph size).  Graph size can be changed (from outside the template) using the ODS GRAPHICS statement options WIDTH and HEIGHT.

View solution in original post

3 REPLIES 3
Jay54
Meteorite | Level 14

Use the MAXLEGENDAREA option on the ODS GRAPHICS statement to increase the area allowed for the legend (or Key).  Default is 20 (%).  You can increase that to 40 or higher if you want.

  ods graphics / maxlegendarea=40;

Yes, increasing the size will also help, but then all the graphs from one procedure will become bigger (until you can change back the graph size).  Graph size can be changed (from outside the template) using the ODS GRAPHICS statement options WIDTH and HEIGHT.

DavidQ_R
SAS Employee

Just what I needed to know - many thanks!

Jay54
Meteorite | Level 14

CPAZ was asking how to mark a discussion as "Answered" in the "Stacked Grouped..." thread.  Can you add a note.  Thanks.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

Register 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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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