Chapter Contents |
Previous |
Next |
SAS/GRAPH Software: Reference |
Graphics devices can be grouped into the following categories:
You can determine whether your device supports user-defined colors in two ways:
OPTS=D582100000000000 |
then byte 1 is D5. Hexadecimal D5 is equal to
1 1 0 1 0 1 0 1 <-- eighth bit is 1 |
The eighth bit is 1, which means the device supports user-defined colors.
Devices That Do Not Support User-defined Colors |
When using devices that do not support user-defined colors, you can specify colors using any color-naming scheme; however, any colors that you specify in RGB, HLS, or gray-scale format are remapped to colors in your device's default colors list. Some devices try to match the user-defined color with the closest color in the device's color palette. Others merely remap the color to the next available color in the device's color palette. To avoid having colors remapped, use the colors in your device's default colors list.
Devices That Support User-defined Colors |
On a device that supports user-defined colors, you can use any color-naming scheme to specify colors. If you specify a color that your device does not support, SAS/GRAPH software remaps the color to an available color that is the closest match.
Pen Plotters |
Please mount the following pens: . . .
By default, SAS/GRAPH software tries to keep a standard set of pens in the plotter's carousel. If colors in the standard set of pens are named in the COLORS= graphics option, a mount request is issued for the entire standard set, even if all of them are not used in the output. This minimizes the number of times pens must be reshuffled as a graph is being drawn. If GOPTIONS COLORS=(NONE) is used, you are only prompted to mount pens for the colors that are actually used in the output.
Note: You can specify any valid SAS name for
a color when using a pen plotter. It does not have to be a predefined or user-defined
color name. For example, you can specify COLOR=PEN3, and you will be prompted
to mount PEN3 or SAS/GRAPH software
will assume a pen of that color is in the appropriate slot. This feature
is often helpful if you are using transparency pens or other special pens.
Limitations |
Note: If you specify a color using
two different color-naming schemes for the same graph (for example, WHITE
and RGB white, CXFFFFFF), SAS/GRAPH
software assumes that those two color specifications are different colors.
It counts them as two color specifications out of the 256 colors that you
are allowed to use on one graph. On some systems, they may appear as different
colors if one of them is a DMS (Display Manager) color.
The number of colors that you can display is limited by the type of graphics output device that you have. If you generate a graph with more colors than the device can display, the colors that cannot be displayed are mapped to an existing color. You may also receive a note in the SAS log telling you when a color is mapped to another color in the colors list and what color will be used instead.
Although your device may support 256 colors, it may not let you use all of them at once. The MAXCOLORS device parameter tells SAS/GRAPH software the maximum number of colors that can be displayed at one time. If you use more than the number of colors in the MAXCOLORS device parameter, the excess colors are remapped.
Note: The MAXCOLORS device parameter defaults to the number of
displayable colors on the basic model of each graphics device supported. If
your graphics device can display more colors than the base model, use the
PENMOUNTS= graphics option to specify the number of colors that can be displayed.
Optionally, you can use PROC GDEVICE to modify the value of the MAXCOLORS
device parameter.
For pen plotters, you use the PENMOUNTS= graphics option
to indicate the number of pen holders on the plotter. Using this graphics
option does not limit the number of colors that you can specify for a graph
that is produced on a pen plotter. If you use more colors than the plotter
has pen holders, you will be prompted to change pens unless you have used
the NOPROMPT graphics option.
You can use the GREPLAY procedure to display graphs previously generated. Sometimes you may need to replay the graphs on a device that cannot display as many colors as the device on which the graph was originally developed.
When you replay graphs on devices that display fewer colors than are in the graph, two situations may cause problems:
If you specify colors on a device that does not support those colors, the colors are remapped to those available for that device. You may also receive a note in the SAS log telling you when a color is mapped to another color in the colors list and what the new color is.
The number of colors that your device can display affects the actual color displayed. If your graphics output device can generate a maximum of 64 distinct colors and your graph contains 256 colors, the 65th through the 256th color specifications are remapped to the device's available colors and may not display as the color you specify.
You can use the TARGETDEVICE= graphics option to preview the way a graph is going to look on a different device. You set this graphics option to the device entry name of the device driver that will be used later. The graph is displayed as close as possible to the way it will display when the other device is used.
Note: When you use the TARGETDEVICE=
graphics option, SAS/GRAPH software
uses the colors list of the target device as the default colors list; any
color that you explicitly use is displayed when you preview the graph, although
the target device may cause the color to be mapped. Refer to TARGETDEVICE for
complete information about the TARGETDEVICE= graphics option.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.