🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 01-14-2022 11:44 AM
(1208 views)
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.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;