turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Specifying the size of an ODS graph

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2012 04:09 AM

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.

Accepted Solutions

Solution

08-31-2012
09:03 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2012 09:03 AM

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.

All Replies

Solution

08-31-2012
09:03 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2012 09:03 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2012 09:24 AM

Just what I needed to know - many thanks!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-31-2012 09:40 AM

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