data hat; do x=-5 to 5 by .25; do y=-5 to 5 by .25; z=sin(sqrt(x*x+y*y)); output; end; end; proc g3d data=hat; plot y*x=z; title 'Cowboy Hat with G3D'; run; quit;The following display shows the output for this program:
goptions device=win;
options sysprint='HP LaserJet III';Note that you can assign only printer driver names that have been previously configured in Windows.
goptions device=winp xxx;
The
value of WINP that you specifyxxx depends
on the type of output device that you use to print your graph:
goptions rotate=landscape. Then the output is oriented as landscape, regardless of the settings in the Print Setup dialog box.
goptions device=driver-name;
where driver-name is
the name of a valid SAS/GRAPH device driver. Consider this example, goptions device=hplj5p3;This statement formats the graph for the Hewlett Packard LaserJet Series V printer. You can view the complete list of SAS/GRAPH drivers by submitting the PROC GDEVICE statement.
filename graphout "graphpic.prn"; goptions gsfname=graphout gsfmode=replace device=hpljs2;
goptions targetdevice=driver-name;
where driver-name is
either one of the WINPxxx drivers
or a SAS/GRAPH native driver.
Graphics File Format
|
File Extension
|
---|---|
Microsoft Windows bitmap
|
BMP
|
Microsoft Windows metafile
|
WMF
|
enhanced metafile
|
EMF
|
Device independent bitmap
|
DIB
|
JPEG format
|
JPG
|
graphic interchange
format (GIF)
|
GIF
|
tag image file format
(TIFF)
|
TIF
|
PC Paintbrush
|
PCX
|
Truevision Targa
|
TGA
|
Encapsulated PostScript
Interchange (EPSI)
|
PS
|
Portable Network Graphics
|
PNG
|
Photo CD image
|
PCD
|
Portable Pixmap
|
PBM
|
X Window bitmap
|
XBM
|
X Window dump
|
XWD
|
Graphics File Format
|
File Extension
|
---|---|
Microsoft Windows bitmap
|
BMP
|
Microsoft Windows metafile
|
WMF
|
enhanced metafile
|
EMF
|
Device independent bitmap
|
DIB
|
JPEG format
|
JPG
|
graphic interchange
format (GIF)
|
GIF
|
tag image file format
(TIFF)
|
TIF
|
Adobe PostScript
|
PS
|
Encapsulated PostScript
Interchange (EPSI)
|
PS
|
Portable Network Graphics
|
PNG
|
Portable Pixmap
|
PBM
|
filename fileref 'filename.cgm'; goptions device=cgmxxxx gsfname=fileref gsfmode=replace;where CGMxxxx is the appropriate CGM driver for your target application, and filename.CGM is the name of the file that you want to create. CGMOFML and CGMOFMP are the recommended device drivers for all CGM output. If CGMOFML and CGMOFMP are not adequate for the receiving software, then you can use the devices in CGM Drivers for Popular Graphics Packages . This table lists the graphics packages to which you can export CGMs and the appropriate drivers to use.
LIBNAME GDEVICE0 'directory';
PROC CATALOG C=SASHELP.DGDEVICE; COPY OUT=GDEVICE0.DEVICES; RUN;
Package
|
Suggested Driver
|
---|---|
Aldus PageMaker
|
CGMAPMA* (disabled in
dgdevice catalog)
|
Aldus Persuasion
|
CGMAPSA* (disabled
in dgdevice catalog)
|
BPS 35 MM Express
|
CGM35 (disabled in
dgdevice catalog)
|
Borland Quattro Pro
(Windows)
|
CGMBQWC (disabled in
dgdevice catalog)
|
Borland Quattro Pro (DOS)
|
CGMBQA* (disabled in
dgdevice catalog)
|
Frame Tech FrameMaker
|
CGMFRCA* (disabled
in dgdevice catalog) CGMFRGA* (disabled in dgdevice catalog) CGMFRMA*
(disabled in dgdevice catalog)
|
Harvard Graphics 2.12 for DOS
|
CGHHG (disabled in
dgdevice catalog)
|
Harvard Graphics 3.0 for DOS
|
CGMHG3A* (disabled
in dgdevice catalog)
|
Harvard Graphics for
Windows
|
CGMHGWA* (disabled
in dgdevice catalog)
|
ImageBuilder
|
CGMIMG (disabled in
dgdevice catalog)
|
Interleaf 5
|
CGMCILFC* (disabled
in dgdevice catalog) CGMGILFG* (disabled in dgdevice catalog) CGMMILFM*
(disabled in dgdevice catalog)
|
Microsoft Word for Windows
6.0
|
CGMMW6C* (disabled
in dgdevice catalog)
|
Microsoft Word for Windows
2.0
|
CGMMWWC* (disabled
in dgdevice catalog)
|
Microsoft PowerPoint
|
CGMMPPA (disabled in
dgdevice catalog)
|
Microsoft Office 97
|
CGMOF97L or CGMOFML,
CGMOF97P, or CGMOFMP
|
Polaroid CI3000
|
CI3000 (disabled in
dgdevice catalog)
|
WordPerfect 5.1 for DOS
|
CGMWPCA (disabled in
dgdevice catalog) CGMWPCAP* (disabled in dgdevice catalog) CGMWPGA
(disabled in dgdevice catalog) CGMWPGAP* (disabled in dgdevice catalog)
CGMWPMA (disabled in dgdevice catalog) CGMWPMAP* (disabled in dgdevice
catalog)
|
WordPerfect 5.2 for
Windows
|
CGMWPWA* (disabled
in dgdevice catalog)
|
WordPerfect Presents for DOS
|
CGMWPCA* (disabled
in dgdevice catalog) CGMWPGA* (disabled in dgdevice catalog) CGMWPMA*
(disabled in dgdevice catalog)
|
Zenographics Pixie
|
CGMPIX (disabled in
dgdevice catalog)
|