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

BAR PATTERN COLOR

Name:
    BAR PATTERN COLOR
Type:
    Plot Control Command
Purpose:
    Specifies the color used for bar patterns on subsequent plots.
Description:
    Dataplot supports two methods for filling the interiors of plot bars:

    1. Bars can be solid filled. The BAR FILL COLOR command is used in this case.

    2. Bars can be filled with a cross-hatch pattern. The BAR PATTERN COLOR command is used in this case.

    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 bar pattern 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:
    BAR PATTERN COLORS <color 1> <color 2> ... <color n>
    where <color 1>, ..., <color n> specify the desired bar pattern colors.

    Up to 100 such bar pattern colors may be specified.

Syntax 2:
    BAR PATTERN 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 bar pattern 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:
    BAR PATTERN COLOR RED BLUE GREEN
    BAR PATTERN COLOR BLACK ALL
    BAR PATTERN COLOR ALL BLACK
    BAR PATTERN COLOR
    BAR PATTERN RGB COLORS 220 109 88 240 220 160
    BAR PATTERN RGB COLORS 220 109 88 ALL
Note:
    The BAR FILL ON command must be used in order for bars to be filled with a pattern. If the bar fill switch is off (the default), this command is ignored. The pattern is specified with the BAR PATTERN command.
Note:
    The BAR PATTERN COLOR command with no arguments sets the bar pattern color to default for all bars. The BAR PATTERN COLOR command with the word ALL before or after the specified color assigns that bar pattern color to all bars; thus BAR PATTERN COLOR BLACK ALL or BAR PATTERN COLOR ALL BLACK plot all bar fills in black.
Note:
    The BAR, SPIKE, CHARACTER, and LINE switch all work independently of each other. That is, a plot point can be a line, a character, a spike or a bar or any combination of the above.
Default:
    All bar pattern colors are set to black and RGB colors are off.
Synonyms:
    None
Related Commands: Applications:
    Presentation Graphics
Implementation Date:
    Pre-1987
    2020/11: Support for RGB color
Program:
     
    LET CARTER = DATA 66 30 11 43 44 41 35 82 54 36
    LET REAGAN = DATA 26 54 84 47 51 51 52 14 36 55
    LET ANDERSON = DATA 6 12 4 8 3 6 10 3 7 8
    LET X = DATA 1 2 3 5 6 7 8 10 11 12
    LET X1 = X - 0.3
    LET X2 = X + 0.3
    .
    XLIMITS 1 12
    XTIC OFFSET 1 1
    MAJOR XTIC MARK NUMBER 12
    MINOR XTIC MARK NUMBER 0
    Y1LABEL PERCENT
    YLIMITS 0 100
    MAJOR YTIC MARK NUMBER 11
    MINOR YTIC MARK NUMBER 1
    .
    LINE BLANK ALL
    BAR ON ALL
    BAR FILL ON ALL
    BAR WIDTH 0.3 ALL
    BAR PATTERN D1 D1D2 D2
    BAR PATTERN THICK 0.3 ALL
    .
    BAR PATTERN COLOR G10 G50 G90
    TITLE DEMONSTRATE BAR PATTERN GRAYSCALE COLORS
    PLOT CARTER X1 AND
    PLOT REAGAN X AND
    PLOT ANDERSON X2
        

    .
    BAR PATTERN COLOR RED GREEN BLUE
    TITLE DEMONSTRATE BAR PATTERN COLORS
    PLOT CARTER X1 AND
    PLOT REAGAN X AND
    PLOT ANDERSON X2
        

    .
    BAR PATTERN RGB COLOR 175 238 238 220 20 60 127 255 0
    TITLE DEMONSTRATE BAR PATTERN RGB COLORS
    PLOT CARTER X1 AND
    PLOT REAGAN X AND
    PLOT ANDERSON X2
        

Date created: 01/28/2021
Last updated: 12/11/2023

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