SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

GRID COLOR

Name:
    ...GRID COLOR
Type:
    Plot Control Command
Purpose:
    Specifies the color of the grid lines on subsequent plots.
Description:
    The analyst can independently control the color of the horizontal and vertical grid lines by specifying the pre-fix in the command.

    Dataplot provides two methods for specifying colors.

    1. Colors can be defined by name (or by the corresponding index). Dataplot adopted it's named colors from the X11 project. Currently, 162 named colors and 100 levels of grayscale are supported. Grayscale can be specified with either G0, G1, ..., G100 (or -1, -2, ..., -100). Many older devices support only a limited number of colors. For these devices, unsupported colors will be mapped to one of the available colors. To specify a named color, see Syntax 1.

    2. Most modern graphics devices support full RGB (RedBlueGreen) color. You can alternatively specify RGB colors by entering three integer values to represent the Red, Green and Blue components, respectively. These values should be in the range 0 to 255.

    When setting the grid RGB color, Dataplot first checks if the device supports RGB colors. If not, the named color will be used. If the device does support RGB color, Dataplot will check if an RGB color has been specified. If yes, then that RGB color is used. If not, the named color will be used.

    To see the list of supported named colors (with the associated index number), see

    https://www.itl.nist.gov/div898/software/dataplot/refman1/ch11/homepage.htm

Syntax 1:
    <prefix>GRID COLOR <color>
    where <color> specifies the desired color;
    and     <prefix> is one of the following:
      no prefix refers to both grid lines
      the prefix X refers to vertical grids
      the prefix Y refers to horizontal grids.
Syntax 2:
    <prefix>GRID RGB COLOR <red> <green> <blue>
    where <red> is an integer number or parameter that specifies the red component;
                <green> is an integer number or parameter that specifies the green component;
                <blue> is an integer number or parameter that specifies the blue component;
    and     <prefix> is one of the following:
      no prefix refers to both grid lines
      the prefix X refers to vertical grids
      the prefix Y refers to horizontal grids.

    To turn off the RGB color, set the values to -1 (any negative value will work). Values greater than 255 will be set to 255.

Examples:
    GRID COLOR YELLOW
    GRID COLOR RED
    GRID COLOR
    XGRID COLOR CYAN
    YGRID COLOR MAGENTA
    GRID RGB COLOR 220 109 88
    YGRID RGB COLOR 175 238 238
Note:
    The GRID COLOR command with no arguments reverts the grid color to default.
Default:
    The default is black (but the default is for the grid lines themselves to be off.)
Synonyms:
    None
Related Commands: Applications:
    Presentation Graphics
Implementation Date:
    Pre-1987
    2020/11: Support for RGB colors
Program 1:
     
    LET LEAD = DATA ...
       164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
    LET POT = DATA ...
       106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
    TITLE DEMONSTRATE GRID COLOR COMMAND
    GRID ON
    GRID THICKNESS 0.3
    GRID PATTERN DASH
    XGRID COLOR RED
    YGRID COLOR BLUE
    X1LABEL LEAD
    Y1LABEL POTASSIUM
    CHARACTER CIRCLE
    CHARACTER SIZE 1.5
    LINE BLANK ALL
    PLOT POT VS LEAD
        
    plot generated by sample program
Program 2:
     
    LET LEAD = DATA ...
       164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
    LET POT = DATA ...
       106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
    TITLE DEMONSTRATE GRID RGB COLOR COMMAND
    GRID ON
    GRID THICKNESS 0.3
    GRID PATTERN DASH
    XGRID COLOR RED
    YGRID COLOR BLUE
    XGRID RGB COLOR 220 109 88
    YGRID RGB COLOR 175 238 238
    X1LABEL LEAD
    Y1LABEL POTASSIUM
    CHARACTER CIRCLE
    CHARACTER SIZE 1.5
    LINE BLANK ALL
    PLOT POT VS LEAD
        
    plot generated by sample program

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 05/13/2021
Last updated: 05/13/2021

Please email comments on this WWW page to alan.heckert@nist.gov.