Hi....I am trying to create multiple graphs for each Month and would like to have more than one graph on each page. In order to know which Month that each graph represents, I have included the bygroup in the title statement. Because I want to allow more than one graph on the same page, only the first graph on the page has a title for that graph. Is there another way to have the bygroup label each graph so that the appropriate month can be displayed for each graph. Thanks
ods rtf file="I:\Reports\file.rtf" startpage=no ;
options nobyline;
Axis1 style=1 width=1 minor=none label=(height=9pt font="arial/bold" angle=90 "Percent") value=(height=9pt font="arial" "0%" "10%" "20%" "30%" "40%" "50%" "60%" "70%" "80%" "90%" "100%") order=0 to 100 by 10;
Axis2 style=1 width=2 label=(height=9pt font="arial/bold" "Response") value=(height=9pt font="arial");
Axis3 label=(height=9pt font="arial/bold" "Intake") value=(height=9pt font="arial");
proc gchart data=Have;
title1 "Month: #byval(Month)";
by Month;
vbar Response / discrete group=Intake type=percent inside=percent outside=freq nolegend g100
coutline=black raxis=axis1 maxis=axis2 gaxis=axis3 woutline=1 patternid=midpoint width=20 autoref clipref cref=graycc ;
run;
quit;
title1;
ods rtf close;
ods listing close;
ods _all_ close;
Use SGPANEL procedure, with PANELBY=month. You can arrange the cells in the panel as you want, and include the month in the cell header.
Yes, SGPANEL supports automatic pagination.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.