Hi ,
How to do one of visit group (phone visit) pattern set as empty (no fill ) in below plot (rest of one as same pattern).
Below is code i am using.
proc sgplot data=vis0;
vbar col1/ response=COL1 group=col2grouporder=data groupdisplay=stack
fillattrs=(color="white")
outlineattrs=(color="black") fillpattern fillpatternattrs=(color="black");
keylegend / position=bottom title="Type of cat";
yaxis grid label="Number of types";
xaxis display=(nolabel) discreteorder=data valueattrs=(size=7);
run;
Thank you,
Raja.
I suggest to use the STYLEATTRS statement available with Proc SGPLOT. Give the following code a go. My example has only 3 group values, so in your example just add a fourth color and fillpattern (Ln, Xn, Rn where n is a number between 1-5).
proc sgplot data=sashelp.cars;
styleattrs
datacontrastcolors=(black white black)
datafillpatterns=(l1 x5 r1)
;
vbar type /
group=origin response=invoice stat=mean
outlineattrs=(color="black")
fillpattern
nofill
;
run;
S
I suggest to use the STYLEATTRS statement available with Proc SGPLOT. Give the following code a go. My example has only 3 group values, so in your example just add a fourth color and fillpattern (Ln, Xn, Rn where n is a number between 1-5).
proc sgplot data=sashelp.cars;
styleattrs
datacontrastcolors=(black white black)
datafillpatterns=(l1 x5 r1)
;
vbar type /
group=origin response=invoice stat=mean
outlineattrs=(color="black")
fillpattern
nofill
;
run;
S
COOL !
ods graphics/attrpriority=none; proc sgplot data=sashelp.class ; styleattrs DATAFILLPATTERNS=(r1 r2 x4 l1 l4 l2) datacontrastcolors=(black black white black black black); vbar sex/group=age response=weight fillattrs=(color="white") outlineattrs=(color="black") fillpattern ; run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.