- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm trying to create a bar graph in SAS with many sub-divisions but with little progress. Does anyone know how to make the following graph in SAS? It is very important that I get all 8 groups and the three subgroups within each, and the yes/no response (find attached). I'm on version 9.4. Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This example should help you:
proc sgpanel data=sashelp.heart;
panelby weight_status / onepanel layout=columnlattice novarname noborder;
vbar chol_status / group=sex groupdisplay=cluster;
rowaxis grid;
run;
If you want to move the headers to the bottom, specify COLHEADERPOS=bottom on the PANELBY statement.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@richart wrote:
Hi, I'm trying to create a bar graph in SAS with many sub-divisions but with little progress. Does anyone know how to make the following graph in SAS? It is very important that I get all 8 groups and the three subgroups within each, and the yes/no response (find attached). I'm on version 9.4. Thanks!
Your example looks like an oldish PROC GCHART graph.
It would help to show what you have attempted so far, preferably with a bit of example data. This might require some data transformations depending upon your current data structure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This example should help you:
proc sgpanel data=sashelp.heart;
panelby weight_status / onepanel layout=columnlattice novarname noborder;
vbar chol_status / group=sex groupdisplay=cluster;
rowaxis grid;
run;
If you want to move the headers to the bottom, specify COLHEADERPOS=bottom on the PANELBY statement.
Hope this helps!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
That is better than I could have dreamed! Cheers!