Chapter Contents

Previous

Next
Doing More with SAS/ASSIST Software

Changing the Background Color for Graphs

To change the background color and add various other features to graphs, you use prefix and suffix commands as described in these steps.

  1. To display the Device Driver Prefix Commands window, follow this selection path:

    Tasks
    [arrow]
    Setup
    [arrow]
    Environment
    [arrow]
    Graphics options
    [arrow]
    Active graphics device
    [arrow]
    Driver Management
    [arrow]
    Supplemental commands
    [arrow]
    Prefix commands
    The Prefix Commands window appears.

    Prefix Commands Window

    [IMAGE]

  2. Type
    goptions cback=color;
    where color is one of the following:

    black lilac rose
    blue lime salmon
    brown magenta steel
    charcoal maroon tan
    cream olive violet
    cyan orange white
    gold pink yellow
    gray purple
    green red

    In the Prefix Commands window, you type the SAS statements or system-specific commands that you want to use. In this step, you use a prefix command to change the background color of your graphic. In the next step, you use a suffix command to reset the color to the default after the chart has been displayed and printed.

    The prefix and suffix commands remain in effect and are associated with the active graphics device until you change them, even after you end your SAS session. Therefore, if you change the background color for a graph, each graph you create with that driver uses the new background color until you change the prefix command.

    When you set up prefix and suffix commands, a catalog entry of dev.SOURCE is created for prefix commands, and a catalog entry of dev.OUTPUT is created for suffix commands, where dev is the device driver. If the GDEVICE0 libref has been assigned to your personal device driver catalog, the catalog entries are created in your SASUSER.PROFILE catalog and the catalog is referenced by GDEVICE0. If GDEVICE0 has not been assigned, the entries are created only in your SASUSER.PROFILE catalog.

  3. Follow this selection path:

    File
    [arrow]
    Close
    A prompt appears asking if you want to save the changes; select Yes.

  4. Select Suffix commands; the Device Driver Suffix Commands window appears.

  5. Type
    goptions cback=;
    to reset the background color to the default. Resetting the background color ensures that when you select different drivers in the same SAS session, the prefix commands of any previously selected drivers are not in effect.

  6. Follow this selection path:

    File
    [arrow]
    Close
    A prompt appears asking if you want to save the changes; select Yes.

  7. Select Goback twice, then OK to return to the WorkPlace menu.

    Note:   To clear the prefix and suffix commands, access the Device Driver Prefix Commands window and Device Driver Suffix Commands window as described above. Delete the commands, then select Close from the File menu for each window.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.