Sample 25590: Add a common title and footnote to PROC GREPLAY output
This sample adds a common title and footnote to PROC GREPLAY output by creating a custom template.
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 adds a common title and footnote to PROC GREPLAY output by creating a custom template.
The graphics output in the Results tab was produced using SAS® 9.2. Submitting
the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Uncomment the following PROC CATALOG step */
/* if you want to delete all of the old */
/* graphs from WORK.GSEG before creating any */
/* new graphs. */
/*
proc catalog c=work.gseg kill;
run; quit;
*/
/* Set the graphics environment */
goptions reset=all cback=white border htitle=10pt htext=9pt;
/* Use the NODISPLAY graphics option when */
/* creating the original graphs. */
goptions device=gif nodisplay xpixels=300 ypixels=200;
/* Write four sample graphs to the graph */
/* catalog of WORK.GSEG. */
axis1 label=none minor=none;
title1 'First Graph';
proc gchart data=sashelp.class gout=work.gseg;
vbar age / discrete raxis=axis1 width=12;
run;
quit;
title1 'Second Graph';
proc gchart data=sashelp.class gout=work.gseg;
vbar height / raxis=axis1 width=12;
run;
quit;
title1 'Third Graph';
proc gchart data=sashelp.class gout=work.gseg;
vbar weight / raxis=axis1 width=12;
run;
quit;
title1 'Fourth Graph';
proc gchart data=sashelp.class gout=work.gseg;
vbar height / raxis=axis1 width=12;
run;
quit;
/* Modify XPIXELS and YPIXELS when creating */
/* the graph containing the common title and */
/* footnote. */
goptions xpixels=600 ypixels=400;
/* Generate the common title and footnote */
/* with PROC GSLIDE. */
title1 h=12pt 'This is a common title';
footnote1 h=12pt font='Albany AMT/bold'
'This is a common footnote';
footnote2 h=.1 ' ';
proc gslide gout=work.gseg;
run;
quit;
/* Reset the GOPTIONS */
goptions reset=all device=gif
gsfname=grafout gsfmode=replace
xpixels=600 ypixels=400;
filename grafout 'c:\temp\g25590.gif';
/* Use the GREPLAY procedure to define a */
/* 5-panel template. The fifth panel */
/* contains the common title and footnote. */
proc greplay igout=work.gseg tc=tempcat nofs;
/* Define a custom template called NEWTEMP */
tdef newtemp des='Five panel template'
/* Define panel 1 */
1/llx=0 lly=5
ulx=0 uly=50
urx=50 ury=50
lrx=50 lry=5
color=white
/* Define panel 2 */
2/llx=0 lly=50
ulx=0 uly=95
urx=50 ury=95
lrx=50 lry=50
color=white
/* Define panel 3 */
3/llx=50 lly=50
ulx=50 uly=95
urx=100 ury=95
lrx=100 lry=50
color=white
/* Define panel 4 */
4/llx=50 lly=5
ulx=50 uly=50
urx=100 ury=50
lrx=100 lry=5
color=white
/* Define panel 5 */
5/llx=0 lly=0
ulx=0 uly=100
urx=100 ury=100
lrx=100 lry=0
color=black;
/* Assign current template */
template newtemp;
/* List contents of current template */
list template;
/* Replay a total of five graphs using */
/* the custom template just created. */
treplay 1:gchart2
2:gchart
3:gchart1
4:gchart3
5:gslide;
run;
quit;
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 adds a common title and footnote to PROC GREPLAY output by creating a custom template.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GREPLAY
|
Date Modified: | 2023-04-20 10:33:52 |
Date Created: | 2005-05-23 14:17:31 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
Linux | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |