BookmarkSubscribeRSS Feed
sanjay1
Obsidian | Level 7

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;

2 REPLIES 2
Reeza
Super User

I'm confused. 

In your current code SUMVAR controls the height. If you want something else you'll have to clarify. 

 

ballardw
Super User

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. .

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 713 views
  • 0 likes
  • 3 in conversation