Data visualization with SAS programming

Controlling Data/Procedure/Graphics Output Areas

Accepted Solution Solved
Reply
Contributor
Posts: 37
Accepted Solution

Controlling Data/Procedure/Graphics Output Areas

I was trying to expand the bar chart to the empty area in the right side of the graphics box in the attached.  Is this a matter of increasing the size of the "Data Area"?  If yes, how can that be done?

Also, how do I control the Procedure Output Area?  And Graphics Output Area?

Thanks.
Jason


Accepted Solutions
Solution
‎06-15-2012 12:29 PM
Valued Guide
Posts: 765

Re: Controlling Data/Procedure/Graphics Output Areas

hi ... another way to change the width of the entire chart is to change the HPOS option

(the blue is a link ... might be worth a try)

View solution in original post


All Replies
SAS Employee
Posts: 977

Re: Controlling Data/Procedure/Graphics Output Areas

What did you use to create this particular bar chart?

Contributor
Posts: 37

Re: Controlling Data/Procedure/Graphics Output Areas

GChart.


SAS Super FREQ
Posts: 925

Re: Controlling Data/Procedure/Graphics Output Areas

I think if you specify a wider bar width, that extra space will be used by the bar chart.

SAS Employee
Posts: 977

Re: Controlling Data/Procedure/Graphics Output Areas

Assuming you don't have any blank titles and/or footnotes on the right-hand side, reserving white-space there ...

Typically, to make the gchart wider so that it will fill more of the available space, you can make the bars wider and/or the space between the bars bigger (using the gchart vbar 'width=' to control the bar width, and the 'space=' option to control the amount of space).

A word of caution though - If you make them "too big" you could run out of space, and then gchart typically reverts back to various default settings.  Also, if your data changes, and you have more bars, they might not fit if you're hard-coding the width= and space=.  I'm not 100% sure, but I think that the font also affects the bar width in some cases (therefore if you get it 'just right' and then change the font, your bar widths might be different).  It's a bit of "black magic" to get it just right, like you're wanting, I suppose :\

Contributor
Posts: 37

Re: Controlling Data/Procedure/Graphics Output Areas

Thank you both, Dan and Robert.

It's a bit tricky in my case because I need to create a huge number of charts with different numbers of bars.  I need to change the bar width and space dynamically and am hoping to maximize and pre-determine the size of the "Data Area".

Solution
‎06-15-2012 12:29 PM
Valued Guide
Posts: 765

Re: Controlling Data/Procedure/Graphics Output Areas

hi ... another way to change the width of the entire chart is to change the HPOS option

(the blue is a link ... might be worth a try)

Contributor
Posts: 37

Re: Controlling Data/Procedure/Graphics Output Areas

Thanks a lot Mike!  I'll try that.

Contributor
Posts: 37

Re: Controlling Data/Procedure/Graphics Output Areas

Thank you very much Mike - it worked and it's simple!


🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 402 views
  • 0 likes
  • 4 in conversation