Sample 35395: Producing high resolution publication graphics with SAS/GRAPH
This sample program illustrates how to generate high resolution publication graphics with SAS/GRAPH. This example generates a graph with 600 dots per inch (DPI) resolution.
To generate a similar graph with SAS 9.2, you can use the ZPNG device driver with this sample program instead of the PNG device driver. You can also turn off the automatic use of styles in SAS 9.2 by specifying the NOGSTYLE option on an OPTIONS statement.
As an alternative in SAS 9.2, you can also use the new PNG300 device driver to generate graphs with 300 DPI resolution automatically.
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 program uses the SAS/GRAPH PNG device driver to create high resolution graphics for publication.
filename pgraf 'c:\temp\png600.png';
goptions reset=all device=png targetdevice=png gsfname=pgraf
xmax=4 in ymax=6 in xpixels=2400 ypixels=3600
vpos=53 hpos=70 lfactor=3 ftext='Arial' gsfmode=replace;
data widgets;
input Region $ Type $ Sales;
datalines;
East Gadgets 5250
East Gizmos 4200
East Widgets 4930
North Gadgets 2700
North Gizmos 4100
North Widgets 3800
South Gadgets 6300
South Gizmos 5900
South Gizmos 5200
West Gadgets 4600
West Gizmos 2700
West Widgets 5500
;
run;
Title H=1.2 'Sales of Gadgets, Gizmos, and Widgets';
proc gchart data=widgets;
vbar3d type / sumvar = sales subgroup = type;
pattern1 v=s c=red;
pattern2 v=s c=green;
pattern3 v=s c=blue;
run;
quit;
filename pgraf clear;
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 program uses SAS/GRAPH and the PNG device driver to create high resolution publication graphics.
| Date Modified: | 2009-05-18 14:44:15 |
| Date Created: | 2009-03-31 16:40:46 |
Operating System and Release Information
| Product Family | Product | Host | Starting Release | Ending Release |
| 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 | |
| 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 | |