BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
twildone
Pyrite | Level 9

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;
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
1. Look at the BODYTITLE option
2. I highly recommend switching to SGPLOT instead of GCHART - you get better quality graphics and the code is simpler.
3. You may want to specify the size of the charts explicitly to ensure they fit on the page.

View solution in original post

5 REPLIES 5
Reeza
Super User
1. Look at the BODYTITLE option
2. I highly recommend switching to SGPLOT instead of GCHART - you get better quality graphics and the code is simpler.
3. You may want to specify the size of the charts explicitly to ensure they fit on the page.
Jay54
Meteorite | Level 14

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.

Reeza
Super User
Would SGPANEL stretch across pages?
DanH_sas
SAS Super FREQ

Yes, SGPANEL supports automatic pagination.

Reeza
Super User
Thanks DanH

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1005 views
  • 4 likes
  • 4 in conversation