The SAS Output Delivery System and reporting techniques

SAS graph in ODS

Not applicable
Posts: 0

SAS graph in ODS

Hi There
Is there any proc in SAS that can create one bar and 2 lines in a graph. I tried proc gbarline but looks like it will only create a single bar and line combination.

Another question: I am trying to create a chart which is easy to create in excel but I am finding hard to create it in SAS.It's 2 bar and a line graph ( for e.g. I have 3 channels air, land ,sea and each channel has it's own averge,forcasted average, bench mark averge. I would like create 2 bars for each channel( own average,forcated avergae) and a line for the bench mark avergae. Is this possible with SAS grpah? I tried few options but didn't go anywhere. Any help would be greatly appreciated.

Thanks in Advance
Not applicable
Posts: 0

Re: SAS graph in ODS

Posted in reply to deleted_user
I believe the available procedures "out of the box" will not produce what you need. However, anything you create with GPlot, GChart or any other SAS/Graph procedure can be extended with additional elements drawn with graphic annotation. The Procedure GAnno will do that for you.

You start by drawing your double bars, and then annotate the line over the bars to get the combination.

I can't give you any example without specific data and more time than I can devote to casually contributing here. However, if you get your two bars drawn and then spend some time reading and experimenting with the GAnno procedure documentation, I am sure you will get to a solution.

You might also search for GAnno and GChart and look for conference papers that might have examples to give you start-up pieces of code specific to your needs. Note that the online documentation for the procedures also includes extensive examples that you can copy and paste into a program and customise.

Kind regards

Not applicable
Posts: 0

Re: SAS graph in ODS

Posted in reply to deleted_user
Thanks for the direction david. will try

Super Contributor
Posts: 297

Re: SAS graph in ODS

Posted in reply to deleted_user
The code below produces 2 bars (one inside the other) and one line. The bars are produced by using the symbol i=needle. This is an alternate to annotate.

symbol1 c=black i=needle v=none w=125 L=1;
symbol2 c=blue i=needle v=none w=75 L=1;
symbol3 c=red i=join v=square w=25 L=2;

axis1 order=(%ord) offset=(5,5) pct
label=('Campaign Start Week');
axis2 order=(0 to 12000 by 3000) offset=(0,0) pct
label=(a=90 'Tons');
axis3 c=red order=(40 to 100 by 20) offset=(0,0) pct
label=(a=90 'Percent on Order');
proc gplot data=all;
format weekstrt date7.;
plot (wip inspectd)*weekstrt /overlay
plot2 onordfin*weekstrt/vref=87.6
Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation