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.
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
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
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.
how is this different than your question from yesterday?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.