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

LABEL COLOR

Name:
    ...LABEL COLOR
Type:
    Plot Control Command
Purpose:
    Specifies the color of the labels to appear on subsequent plots.
Description:
    The labels are the text which appear below the bottom horizontal frame line and outside of the vertical frame lines. They typically define the variables/axes which are being plotted. The label colors hold for all subsequent plots until defaulted (via the ...LABEL COLOR command with no arguments) or until overridden with new label colors. The analyst can define colors for all 5 plot labels:

    1. 3 below the bottom horizontal frame;
    2. 1 to the left of the left vertical frame;
    3. 1 to the right of the right vertical frame line.

    The label is specified by the prefix 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 label 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>LABEL COLOR <color>
    where <color> specifies the desired color;
    and     <prefix> is one of the following:
      X1 refers to the first horizontal label
      X2 refers to the second horizontal label
      X3 refers to the third horizontal label
      X refers to the first horizontal label
      Y1 refers to the left vertical label
      Y2 refers to the right vertical label
      Y refers to the left and right vertical labels
      no prefix refers to all 5 axis labels.

    The specification of each individual label with a different color is rare. The most common form (by far) for this command is the last one (with no prefix) which defines the color uniformly for all 5 labels.

Syntax 2:
    <prefix>LABEL RGB COLOR <red> <green> <blue>
    where <red> is a number or parameter that specifies the red component;
                <green> is a number or parameter that specifies the green component;
                <blue> is a number or parameter that specifies the blue component;
    and     <prefix> is one of the following:
      X1 refers to the first horizontal label
      X2 refers to the second horizontal label
      X3 refers to the third horizontal label
      X refers to the first horizontal label
      Y1 refers to the left vertical label
      Y2 refers to the right vertical label
      Y refers to the left and right vertical labels
      no prefix refers to all 5 axis labels.

    The specification of each individual label with a different color is rare. The most common form (by far) for this command is the last one (with no prefix) which defines the color uniformly for all 5 labels.

    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:
    Y1LABEL COLOR BLUE
    YLABEL COLOR BLUE
    LABEL COLOR YELLOW
    LABEL COLOR WHITE
    LABEL RGB COLOR 238 238 75
Default:
    All label colors are black.
Synonyms:
    None
Note:
    A ...LABEL COLOR command with no arguments reverts the color to default. Thus X1LABEL COLOR with no arguments reverts the first horizontal axis label to default. A ...LABEL COLOR command with no prefix refers to all 5 labels. Thus LABEL COLOR BLUE assigns the color BLUE to all 5 labels. LABEL COLOR with no prefix and no arguments reverts all 5 labels to default.
Related Commands: Applications:
    Presentation Graphics
Implementation Date:
    Pre-1987
    2020/10: Added support for RGB color
Program 1:
     
    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
    . SUBSET OF CURRIE.DAT REFERENCE FILE
    .
    SERIAL READ LEAD
    164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
    END OF DATA
    SERIAL READ POT
    106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
    END OF DATA
    .
    TITLE DEMONSTRATE LABEL COLOR
    X1LABEL LEAD
    Y1LABEL POTASSIUM
    X1LABEL COLOR RED
    Y1LABEL COLOR BLUE
    CHARACTER CIRCLE
    CHARACTER SIZE 1.5
    LINE BLANK ALL
    PLOT POT VS LEAD
        
    plot generated by sample program
Program 2:
     
    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
    . SUBSET OF CURRIE.DAT REFERENCE FILE
    .
    SERIAL READ LEAD
    164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
    END OF DATA
    SERIAL READ POT
    106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
    END OF DATA
    .
    TITLE DEMONSTRATE LABEL RGB COLOR
    X1LABEL LEAD
    Y1LABEL POTASSIUM
    X1LABEL COLOR RED
    Y1LABEL COLOR BLUE
    X1LABEL RGB COLOR 220 109 88
    Y1LABEL RGB COLOR 175 238 238
    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.gov.