For the native
SAS/GRAPH
devices, you can use the XPIXELS=, XMAX=, YPIXELS=, and YMAX= graphics
options to set the resolution of your graph. Note the following:
-
The XPIXELS=, YPIXELS=, XMAX=,
and YMAX= graphics options are not supported by the default display
devices and the Universal Printer devices, including the shortcut
devices. These graphics options are partially supported by the ACTIVEX
and JAVA devices.
-
The resolution of GIF and BMP images
is fixed and cannot be changed using this method.
The XPIXELS= and YPIXELS=
graphics options set the number of pixels for the X and Y axes respectively.
The XMAX= and YMAX= graphics options set the maximum boundaries of
the output on the X and Y axes respectively. The
SAS/GRAPH software computes the resolution
as follows:
X-resolution = XPIXELS
/ XMAX
Y-resolution = YPIXELS
/ YMAX
Interactions of Graphics Options That Affect Resolution
|
|
|
|
|
Changes the dimensions
and recalculates the value of XMAX= and YMAX= in order to retain the
resolution.
|
|
|
Changes the dimensions
and recalculates the value of XPIXELS= and YPIXELS= in order to retain
the resolution.
|
|
|
Changes the horizontal
dimension and recalculates the resolution.
|
|
|
Changes the vertical
dimension and recalculates the resolution.
|
For example, for the
graphics option settings XPIXELS=800 and XMAX=8in, the resulting X
resolution is 100 DPI.
You can set the X resolution,
the Y resolution, or both. Here is an example that sets the resolution
of a 1000-pixel-wide-by-1200-pixel-high TIFF image of a graph to 200
DPI.
option gstyle;
ods html close;
ods listing style=seaside;
goptions reset=all device=tiffp xpixels=1000 xmax=5in ypixels=1200 ymax=6in;
proc gchart data=sashelp.cars;
vbar Make;
where MPG_Highway >= 37;
run;
quit;
ods listing close;
ods html;