Hello, I am creating a long figure in sas and would like to split it between two pages of output for clarity. Can anyone please help with this? Even though I found many sas forums on putting multiple figures into one page, I cannot find how to put one figure on two pages. Thanks!
I haven't created that many bar charts, but all hat one request in common: the chart must fit on a single page. So i think you have to split the data and create both graphs manually. This could cause some trouble, for example if one bar is not long enough to be displayed on both pages.
Destination? File format or actually to paper on a printer?
Can you share the code that currently makes your graph? And describe which VALUE you want to split the data at?
Easiest is likely going to involve adding a variable for BY processing to make a separate graph for each level of the BY variable.
An example:
/* basic plot*/ proc sgplot data=sashelp.class; vbar age/response=height; run; /*split into two plots*/ data newplot; set sashelp.class; plotnum = (age ge 14); run; proc sort data=newplot; by plotnum; run; proc sgplot data=newplot; BY plotnum; vbar age/ response=height; run;
I suspect that you would want to examine the options involving by groups to suppress the default display of the by variable values but this might get you started.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.