I am using SGPLOT to create a VBAR graph that needs to be in order AND grouped (ie bars are color-coded, not grouped adjacently), but I am having problemx when I use both GROUP and GROUPORDER or CATEGORYORDER together. Here is my code:
************
proc sort data=streams; by bugpc1; run;
proc sgplot data=streams;
vbar name/response=bugpc1 group=zone grouporder=ascending categoryorder=respasc;
run;
************
As you can see I pre-sorted my dataset before hand, used GROUPORDER, used CATEGORYORDER, and every combination of the above arguments, but nothing has worked.
I see this interaction note in the SGPLOT => VBAR page <http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n0p7vdd69sgf3wn1479qxqxuryrt.htm> that says "If a group variable is specified in the plot statement, the response sort option is ignored and a note is generated in the log. (You can use a BY statement in the procedure if you want to group data.)" However, if I add a BY statement, it creates 'n' number of graphs instead of 1 graph.
Thanks for any help you can provide.
-- Mark
************
proc sort data=streams; by bugpc1; run;
proc sgplot data=streams;
vbar name/response=bugpc1 group=zone grouporder=ascending categoryorder=respasc;
run;
************
As you can see I pre-sorted my dataset before hand, used GROUPORDER, used CATEGORYORDER, and every combination of the above arguments, but nothing has worked.
I see this interaction note in the SGPLOT => VBAR page <http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n0p7vdd69sgf3wn1479qxqxuryrt.htm> that says "If a group variable is specified in the plot statement, the response sort option is ignored and a note is generated in the log. (You can use a BY statement in the procedure if you want to group data.)" However, if I add a BY statement, it creates 'n' number of graphs instead of 1 graph.
Thanks for any help you can provide.
-- Mark