Hi SAS experts,
Am trying to control the hights of bar graph.How can I controll the hights of bar graph..Below is my code..please help
axis1 label=none major=none minor=none style=0
value=none;
axis2 label=none;
legend1 label=(position=top) position=(right middle)
across=1 shape=bar(.11in,.11in);
pattern1 v=solid color=CXB22222;
pattern2 v=solid color=CXFF00FF;
pattern3 v=solid color=CXB8860B;
/*pattern4 v=solid color=CX8B4513;*/
/*pattern5 v=solid color=CX556B2F;*/
/*pattern6 v=solid color=CX6495ED;*/
/*pattern7 v=solid color=CX4169E1;*/
ods pdf file="path&name..pdf";
proc gchart data=test&name.;
vbar3d YEAR / discrete
sumvar=sales
shape=cylinder
subgroup=type
cframe=grayaa
caxis=black
width=10
space=4
legend=legend1
maxis=axis2
raxis=axis1
des="total sales for &name.";
run;
quit;
ods pdf close;
I'm confused.
In your current code SUMVAR controls the height. If you want something else you'll have to clarify.
The apparent height is going to be controlled by combinations of the device display area and the axis settings. For example if you vertical axis is set to diplay y values from 0 to 100 your bar heights will be different than if the axis is showing 0 to 50 for the same device settings. If you do not specify the y axis options such as ORDER, to control tickmarks, then SAS will generate a default one that displays the values involved and will vary depending on the data. .
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.