- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi SAS friends,
Am using Proc SGpanel to create a single panel graph with 3 groups, and 3 subgroups.
I"d like the subgroup vbars to have the same fill pattern across the three main groups, that is Mo has one fill pattern, Larry has a different one, as does Curly.
Have looked at the online help and have had no luck in solving.
Attached is a sample dataset, and current graph image and here's the current code.
/* START metabolite % figure */
ods listing;
ods html path="&out.\" (url=NONE) style=journal;
ods graphics on /attrpriority=none imagename="Met_Pct" imagefmt=png noborder;
ODS HTML ;
Title1 color=black height=2 "Bryl cream use amongst early comedians" ;
proc format;
value O_No
1='Winken'
2='Blinken'
3='Nod'
;
value C_No
1='Mo'
2='Larry'
3='Curly'
;
run;
proc sgpanel data = sf.MLC noautolegend ;
format O_No O_No. C_No C_No. ;
panelby O_No / onepanel layout=columnlattice colheaderpos=top /*noborder*/ novarname;
vbar C_No / dataskin=crisp groupdisplay=cluster response=pct grouporder=data ;
rowaxis label="%" min = 0 max = 80 valueattrs=(size=8) ;
colaxis display=(nolabel) ;
run;
ods graphics off;
ods html close;
/* END metabolite % figure */
Would greatly appreciate help in solving this one !
Thank you !
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Recreate the graph using Proc SGPlot, V-bar option.
Proc SG Panel does not easily support the V-bar fill needed, while Proc SGPlot was able to do it easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Recreate the graph using Proc SGPlot, V-bar option.
Proc SG Panel does not easily support the V-bar fill needed, while Proc SGPlot was able to do it easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ods graphics/attrpriority=none;
proc sgpanel data=sashelp.heart noautolegend ;
panelby bp_Status/ onepanel layout=columnlattice colheaderpos=top /*noborder*/ novarname;
vbar smoking_status /group=smoking_status nofill fillpattern dataskin=crisp groupdisplay=cluster response=weight grouporder=data ;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you ! Sorry for the late reply !