The SAS Output Delivery System and reporting techniques

Proc gbarline. Only one bar?

Reply
N/A
Posts: 0

Proc gbarline. Only one bar?

I want to make a bar line chart with two bars. Does anybody know if Proc Gbarline can manage this?
It seems like Proc Gbarline can make these kind of charts with only one bar.

Thanx for help.
SAS Employee
Posts: 174

Re: Proc gbarline. Only one bar?

A SAS/GRAPH expert in Technical Support told me:

For the most part, the number of bars produced by PROC GBARLINE depends upon your input data and the value of the LEVELS= option on the BAR statement of PROC GBARLINE. The following code demonstrates how to produce output from PROC GBARLINE that has 5 bars:
[pre]
Goptions
Reset = All
Device = WIN
Cback = Beige
;

data nyse;

informat DAY date9.;
format DAY date5.;

input DAY $ HIGH LOW CLOSE VOLUME;

volume = volume/1000;

cards;
02AUG2002 10478.76 10346.24 10426.91 1908809
03AUG2002 11042.92 10298.44 10274.65 1807543
04AUG2002 10498.22 10400.31 10456.43 1500656
05AUG2002 10694.47 10636.32 10762.98 1498403
06AUG2002 10801.12 10695.13 10759.48 1695602
;
run;

title1 h=2 f='Arial/bo' "NYSE Closing Price and Volume By Day";
footnote h=1.5 f='Arial/bo' "Release is &sysvlong";

symbol1 f=marker v=U c=green h=1;
pattern1 v=solid c=libg;

proc gbarline data=nyse;

bar day / sumvar=volume levels=5;

plot / sumvar=close;
run;
quit;
[/pre]

-- David Kelley, SAS
Super Contributor
Posts: 260

Re: Proc gbarline. Only one bar?

I am not sure to understand your problem properly :
- does your GBARLINE proc only produce ONE and only one bar (then the previous answer should fix ; you can either use the DISCRETE option in the BAR statement to get one bar per value) ;
- or do you want two SERIES of bars on the same graph, in an overlayed kind of graph ?
N/A
Posts: 0

Re: Proc gbarline. Only one bar?

What I want is two series of bars (your second option). I'll be glad if there is a solution to that problem.

Thanx for help!
Ask a Question
Discussion stats
  • 3 replies
  • 145 views
  • 0 likes
  • 3 in conversation