## manipulate chart area using proc gchart

Solved
Frequent Contributor
Posts: 124

# manipulate chart area using proc gchart

Hi,

I am working with a sas dataset called 'final' and I need to create a bar chart of the frequencies(y-axis) for the individual values in the variable var1(x-axis). There are hundred such values with little differences in their values by decimal points.

 var1 1.65 4.83 6.14 6.56 8.35 9.22 9.57 10.23 10.67 11.98 45.23 67.54 34.53

I used proc ghcart and my code is

proc gchar data=final;

vbar var1;

run;

This gives me a very crowded chart and I need to increase the chart area to be able to show all 100 values. Please advice on how I can manipulate the chart area. Should I use another procedure ? Als, I am using SAS 9.4

Thanks.

Accepted Solutions
Solution
‎03-19-2015 10:32 AM
SAS Super FREQ
Posts: 975

## Re: manipulate chart area using proc gchart

Given the width of these value strings, and the number of values, you might want to consider using an HBAR instead of a VBAR. AS for changing the size of the graph, using the XPIXELS/YPIXELS options on the GOPTIONS statement. For example:

goptions xpixels=600 ypixels=1000;

Hope this helps!

Dan

All Replies
Solution
‎03-19-2015 10:32 AM
SAS Super FREQ
Posts: 975

## Re: manipulate chart area using proc gchart

Given the width of these value strings, and the number of values, you might want to consider using an HBAR instead of a VBAR. AS for changing the size of the graph, using the XPIXELS/YPIXELS options on the GOPTIONS statement. For example:

goptions xpixels=600 ypixels=1000;

Hope this helps!

Dan

Frequent Contributor
Posts: 124

## Re: manipulate chart area using proc gchart

Thanks DanH. I will work on your suggestions and will consider HBAR as well.  @Reeza. its different from the last one because the gchart gives me a distribution of the values by frequency. Its almost equivalent to the histogram by proc univariate , but I get individual bars here.  Just plotting the individual values by id was not helping me (proc sgplot) and wasn't giving any information on the shape of the distribution. Basically I am looking to do 2 charts for distribution one by univariate procedure and other by gchart.

Super User
Posts: 21,530

## Re: manipulate chart area using proc gchart

how is this different than your question from yesterday?

🔒 This topic is solved and locked.

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

Discussion stats
• 3 replies
• 374 views
• 1 like
• 3 in conversation