XPIXELS

Specifies the width of the addressable display area in pixels and in conjunction with XMAX determines the horizontal resolution for the device.
Used by: GOPTIONS statement; GDEVICE procedure; GDEVICE Detail window
Default: device-dependent
Restriction: Partially supported by Java and ActiveX
See: XMAX

Syntax

XPIXELS=width-in-pixels

Parameter Values

width-in-pixels
is a positive integer up to eight digits long (0...99999999).

Details

Like the XMAX device parameter, XPIXELS controls the width of the display area, but the width is in pixels rather than inches, centimeters, or points. Typically, you might use XPIXELS to change the width of the display area for an image format device.
Note: This option overrides the OutputWidth style attribute in the graph styles. For more information about graph styles, refer to the TEMPLATE procedure documentation in SAS Output Delivery System: User's Guide.
The value of XPIXELS is used in calculating the resolution of the device:
x-resolution = XPIXELS / XMAX
However, changing XPIXELS does not necessarily change the device resolution:
  • If you use the GOPTIONS statement to change only the value of XPIXELS= and do not change XMAX=, SAS/GRAPH retains the default resolution of the device and recalculates XMAX, temporarily changing the width of the display. If HSIZE= is also not specified, SAS/GRAPH uses the new XMAX value to calculate a new HSIZE value, using this formula:
    HSIZE = XMAX − margins
    Note: Margins are not device parameters, but represent the value of HORIGIN (the left margin) plus the right margin. The right margin is whatever is left over when you subtract HSIZE and HORIGIN from XMAX. The values of margins is always based on the original XMAX and HSIZE values that are stored in the device entry.
    If HSIZE= is specified and its value is larger than XMAX, HSIZE= is ignored.
  • If you use the GDEVICE procedure to permanently change the value of the XPIXELS device parameter in the device entry, SAS/GRAPH automatically recalculates the resolution of the device is using the value of XMAX device parameter.
  • If you change the values of both XMAX= and XPIXELS=, SAS/GRAPH recalculates the resolution of the device using both of the specified values.
Note: When SAS/GRAPH recalculates the resolution, the resolution does not necessarily change. For example, both of these pairs of values produce the same resolution, 300dpi:
XPIXELS=1500 and XMAX=5
XPIXELS=1800 and XMAX=6
To reset the value of XPIXELS to the default, specify XPIXELS=0. To return to the default resolution for the device, specify both XPIXELS=0 and XMAX=0.