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

CHARACTER COLORS

Name:
    CHARACTER COLORS
Type:
    Plot Control Command
Purpose:
    Specifies the colors of the characters to appear at the plot points of each trace on subsequent plots.
Description:
    Dataplot defines the points on a plot by "traces". A trace is a set of points that are drawn with the same attributes. For example,

      PLOT Y1 X1 AND
      PLOT Y2 X2

    has two traces. The first is the points defined by Y1 and X1 and the second is the points defined by Y2 and X2. Attributes can be set for up to 100 traces.

    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 character 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:
    CHARACTER COLORS <color 1> <color 2> ... <color n>
    where <color 1>, ..., <color n> specify the desired character colors.

    Up to 100 such character colors may be specified.

Syntax 2:
    CHARACTER RGB COLORS <red-1> <green-1> <blue-1> ...
                            <red-n> <green-n> <red-n>
    where <red-1>, <green-1>, <blue-1>, ..., <red-n>, <green-n>, <blue-n> is a list of integer values that specify the desired RGB character colors.

    Up to 100 such triplets of color values can be specified.

    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:
    CHARACTER COLORS RED BLUE RED
    CHARACTER COLORS RED RED BLUE BLUE
    CHARACTER COLORS ALL YELLOW
    CHARACTER COLORS YELLOW ALL
    CHARACTERS COLORS
    CHARACTER RGB COLORS 220 109 88 240 220 160
    CHARACTER RGB COLORS 220 109 88 ALL
Note:
    The CHARACTER COLORS command with no arguments sets the character color to default for all traces. The CHARACTER COLORS command with the word ALL before or after the specified color assigns that color to the characters on all traces; thus CHARACTER COLOR GREEN ALL or CHARACTER COLOR ALL GREEN assigns the color green to the characters on all traces.
Default:
    All character colors are set to black and RGB colors are off.
Synonyms:
    None
Related Commands: Applications:
    Graphics
Implementation Date:
    Pre-1987
    2020/11: Support for RGB colors
Program:
     
    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
    . SUBSET OF CURRIE.DAT REFERENCE FILE
    .
    LET ID2 = DATA 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
    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
    LET X = SEQUENCE 1 1 17
    .
    CHARACTER CIRCLE CIRCLE SQUARE SQUARE
    CHARACTER FILL ON ALL
    LINE BLANK ALL
    LEGEND FONT SIMPLEX
    LEGEND 1 CIRC() - POTASSIUM
    LEGEND 2 SQUA() - LEAD
    .
    CHARACTER COLOR G10 G90 G10 G90
    TITLE DEMONSTRATE GRAYSCALE CHARACTER COLOR COMMAND
    PLOT POT X ID2 AND
    PLOT LEAD X ID2
        

    CHARACTER COLOR RED BLUE RED BLUE
    TITLE DEMONSTRATE CHARACTER COLOR COMMAND
    PLOT POT X ID2 AND
    PLOT LEAD X ID2
        

    CHARACTER RGB COLOR 175 238 238 220 20 60 175 238 238 220 20 60
    TITLE DEMONSTRATE CHARACTER RGB COLOR COMMAND
    PLOT POT X ID2 AND
    PLOT LEAD X ID2
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 01/26/2021
Last updated: 01/26/2021

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