Bar graphs

Reply
Contributor kds
Contributor
Posts: 31

Bar graphs

Hello SAS Experts,

I have dataset with 4 rows:

MONTHPRICE
JAN110
FEB175
APR275
MAR310

I am running below code:

proc gchart data=monprc;

vbar month/discrete type=sum sumvar=price inside=sum nostats;

run;

quit;

and getting the output which is attached.

The problem is that I do not want the text 'SUM' displayed as I am not doing any statistics. But it looks like since I am using type=sum , its displaying 'SUM' along the Y-axis.

My questions to SAS Experts is

1)  How do I get rid of this 'SUM' text from the graph?

2)  Is this the correct way to display Bar graphs that dont involve any statistics?

Thank You.


bar_graph.JPG
Super User
Posts: 10,552

Re: Bar graphs

AXIS statement is used to control the appearanc of text in the axis.

Add before the Proc Chart statement:

AXIS1 label='Price';

and add RAXIS = Axis1 to the options for the VBAR statement.

Contributor kds
Contributor
Posts: 31

Re: Bar graphs


It worked...   Thank you ballardw!!   U r great!

Ask a Question
Discussion stats
  • 2 replies
  • 156 views
  • 0 likes
  • 2 in conversation