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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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