Sample 48569: Use the STARTPAGE option in the ODS PDF statement to put multiple graphs on a single page in a PDF document
The sample code on the Full Code tab uses the STARTPAGE=NEVER option in the ODS PDF statement to put four graphs on the same page in the resulting PDF document. Note that the code uses a different combination of HSIZE, VSIZE, HORIGIN, and VORIGIN in each GOPTIONS statement to size and position each graph correctly.
The STARTPAGE option is documented as an option in the ODS PDF statement in the SAS® 9.4 Output Delivery System: User's Guide, Fifth Edition.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The sample code below uses the STARTPAGE=NEVER option in the ODS PDF statement to put four graphs on the same page in the resulting PDF document. Note that the code uses a different combination of HSIZE, VSIZE, HORIGIN, and VORIGIN in each GOPTIONS statement to size and position each graph correctly.
options nodate nonumber orientation=landscape;
goptions reset=all device=sasprtc htitle=13pt;
ods _all_ close;
ods pdf file='startpage.pdf' notoc dpi=300 startpage=never;
goptions hsize=5in horigin=0in vsize=4in vorigin=4.25in;
title1 'Average Weight for Females';
axis1 minor=none label=(angle=90 'Average Weight')
order=(0 to 160 by 20);
proc gchart data=sashelp.class;
where sex="F";
vbar age / sumvar=weight type=mean subgroup=age
nolegend discrete width=8
raxis=axis1
description='Average Weight for Females';
run;
quit;
goptions hsize=5in horigin=5.2in vsize=4in vorigin=4.25in;
title1 'Average Weight for Males';
axis1 minor=none label=(angle=90 'Average Weight')
order=(0 to 160 by 20);
proc gchart data=sashelp.class;
where sex="M";
vbar age / sumvar=weight type=mean subgroup=age
nolegend discrete width=8
raxis=axis1
description='Average Weight for Males';
run;
quit;
goptions hsize=5in horigin=0in vsize=4in vorigin=0in;
title1 'Average Height for Females';
axis1 minor=none label=(angle=90 'Average Height')
order=(0 to 80 by 10);
proc gchart data=sashelp.class;
where sex="F";
vbar age / sumvar=height type=mean subgroup=age
nolegend discrete width=8
raxis=axis1
description='Average Height for Females';
run;
quit;
goptions hsize=5in horigin=5.2in vsize=4in vorigin=0in;
title1 'Average Height for Males';
axis1 minor=none label=(angle=90 'Average Height')
order=(0 to 80 by 10);
proc gchart data=sashelp.class;
where sex="M";
vbar age / sumvar=height type=mean subgroup=age
nolegend discrete width=8
raxis=axis1
description='Average Height for Males';
run;
quit;
ods _all_ close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to use the STARTPAGE option in the ODS PDF statement to put multiple graphs on a single page in a PDF document.
Date Modified: | 2012-12-07 15:43:38 |
Date Created: | 2012-11-29 15:36:41 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.1 TS1M3 SP4 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
Windows Vista | 9.1 TS1M3 SP4 | |
Windows Vista for x64 | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | |
HP-UX IPF | 9.1 TS1M3 SP4 | |
Linux | 9.1 TS1M3 SP4 | |
Linux on Itanium | 9.1 TS1M3 SP4 | |
OpenVMS Alpha | 9.1 TS1M3 SP4 | |
Solaris for x64 | 9.1 TS1M3 SP4 | |
Tru64 UNIX | 9.1 TS1M3 SP4 | |