XMAX

Specifies the width of the addressable graphics display area; affects the horizontal resolution of the device and the horizontal dimension of the graphics output area.
Used by: GOPTIONS statement, GDEVICE procedure, GDEVICE Detail window
Restriction: Ignored by default display drivers, universal printing drivers, Java, and ActiveX
See: HSIZE

PAPERSIZE

XPIXELS

Syntax

XMAX=width <IN | CM | PT>

Parameter Values

width
is a positive number that can be followed by a unit specification, either IN for inches (default), or CM for centimeters, or PT for points. If you do not specify XMAX, a default width is searched for in this order:
  1. the width specification on an OPTIONS PAPERSIZE setting
  2. XMAX in the device entry catalog.
If XMAX=0, default behavior is used. If both XMAX and PAPERSIZE have been specified on GOPTIONS, the last request is used.

Details

Like the XPIXELS device parameter, XMAX controls the width of the display area, but the width is in inches, centimeters, or points rather than pixels. Typically, you might use XMAX to change the width of the display area for a hardcopy device.
SAS/GRAPH uses the value of XMAX in calculating the horizontal resolution of the device:
x-resolution = XPIXELS / XMAX
However, changing XMAX does not necessarily change the resolution:
  • If you use the GOPTIONS statement to change only the value of XMAX= and do not change XPIXELS=, SAS/GRAPH retains the default resolution of the device and recalculates XPIXELS, temporarily changing the width.
  • If you specify values for both XMAX= and XPIXELS=, SAS/GRAPH recalculates the resolution of the device using both of the specified values. The new resolution might be different. For example, both of these pairs of values produce the same resolution, 300dpi:
    XPIXELS=1500 and XMAX=5
    XPIXELS=1800 and XMAX=6
XMAX also affects the value of HSIZE, which controls the horizontal dimension of the graphics output area.
  • If you change the value of XMAX and do not change HSIZE=, SAS/GRAPH calculates a new value for HSIZE=, using this formula:
    HSIZE = XMAX − margins
    Note: The margins quantity, here, is not a device parameter. It represents the value of the left margin plus the right margin. The left margin is the value of HORIGIN. The right margin is whatever is left over when you subtract HSIZE and HORIGIN from XMAX. The value of margins is always based on the original XMAX and HSIZE values that are stored in the device entry.
  • If you specify values for both XMAX= and HSIZE=, SAS/GRAPH uses the specified values plus the value of device parameter HORIGIN. Anything left over is added to the right margin. For example, if XMAX=6IN and HSIZE=4IN and HORIGIN=.5IN, the right margin will be 1.5in. If HSIZE= is larger than XMAX=, HSIZE= is ignored.
To permanently change the value of the XMAX device parameter in the device entry, use the GDEVICE procedure. This can change the resolution.
To temporarily change the size of the display and the resolution of the device for the current graph or for the duration of your SAS session, use XMAX= and XPIXELS= in the GOPTIONS statement.
To reset the value of XMAX to the default, specify XMAX=0. To return to the default resolution for the device, specify both XMAX=0 and XPIXELS=0.
See Overview for more information.