Hi! I need you help! I'm trying to use the proc sgplot in order to plot 3 variables: 1 with a line, and the other 2 variable with grouped vertical bars (no stacked). I've tried several ways but i can´t get what I need... this is my code:
proc sgplot data=work.subset;
title "Budget and sales";
vbar month/ response=sales_A ;
vbar month/ response=sales_B;
vline month/ response=sales_acum y2axis;
You seem to have 3 separate columns. With this data structure, you have a couple of options. With SAS (TS2M3), you can get the bars side by side using GTL. Else, you can get overlaid bars. See code below. The DISCRETEOFFSET option in GTL will not work for a SAS release prior to TS2M3.
Side-by-side grouped bar charts are coming with SAS 9.3.
input month $ sales_a sales_b sales_acum;
Jan 200 300 500
Feb 300 400 700
Mar 200 400 600