Chapter Contents |
Previous |
Next |
SAS/GRAPH Software: Reference |
Specifying Default Colors in a GOPTIONS Statement |
Option | Sets default color for | |
---|---|---|
CBACK= | background for graphics output | |
CBY= | BY lines in graphics output | |
CPATTERN= | PATTERN statements | |
CSYMBOL= | SYMBOL statements | |
CTEXT= | all text and the border in graphics output | |
CTITLE= | border, plus all titles, footnotes, and notes |
SAS/GRAPH software uses these values if you do not explicitly select colors in other statements. Refer to Graphics Options and Device Parameters Dictionary for complete information about each of these graphics options.
If you do not explicitly specify color in a SAS statement or set a default color for a graphic element in the graphics output, SAS/GRAPH software searches for a colors list.
Defining and Using a Colors List |
The color selected from the colors list varies depending
on the procedure using the color and the graphics element that is being drawn.
Usually, the first color in the list is used; however, certain procedures
may select other colors. For example, if the CAXIS= option is not specified
in the GCONTOUR procedure's PLOT statement, the procedure selects the second
color from the colors list to draw the axes.
goptions colors=(red green blue);
A specified color value must not exceed eight characters and must be in a valid SAS color-naming scheme (see Color-naming Schemes).
Note: The COLORS= graphics
option only provides a default
lookup table. Any time you explicitly select any other colors in your SAS/GRAPH
program, those colors are used to draw the graphics elements for which you
have selected them.
For a pen plotter, SAS/GRAPH
software uses the order of the colors in the COLORS= graphics option to define
the order of pens for a multiple pen plotter, or to make a pen plotter prompt
you to change the pen when a graph uses more colors than the plotter has.
If you do not define a colors list with the COLORS= graphics option, SAS/GRAPH software uses the default colors list for your device. This colors list is found in the device entry of the specified device driver (for details on specifying a device driver, refer to The GDEVICE Procedure). If you select a different device driver during a SAS session, the colors list changes unless you have specified the COLORS= graphics option.
To view and modify the device's default colors list,
use the GDEVICE procedure (for details, refer to The GDEVICE Procedure).
To use only the colors that you explicitly specify, submit
goptions colors=(none);
This causes colors to be used only as they are encountered
in your SAS program. This is useful if you want to generate graphics output
with the maximum of 256 colors, and you do not want to use any of the device's
default colors. It also prevents a procedure from using up some of the 256
colors with the default colors list and prevents SAS/GRAPH
software from remapping colors because too many colors were specified.
goptions colors=();
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.