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

BOX FILL COLOR

Name:
    BOX ... FILL COLOR
Type:
    Plot Control Command
Purpose:
    Specifies the color to use for the interior region of a box to appear on subsequent plots (as specified via the BOX ... COORDINATES command) or boxes generated by the BOX command. Up to 100 boxes can be specified with the BOX ... COORDINATES command.
Description:
    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 box fill 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:
    BOX <id> FILL COLOR <color>
    where <id> is a box identifier (a number or parameter) in the integer range 1 to 100;
    and     <color> identifies the desired color.

    If no <id> is given, all 100 box fill colors will be set to the specified color.

Syntax 2:
    BOX <id> RGB FILL COLOR <red> <green> <blue>
    where <id> is a box identifier (a number or parameter) in the integer range 1 to 100;
    and     <red>, <green>, <blue> is a list of integer values that specifies the desired RGB box fill color.

    If no <id> is given, all 100 box fill colors will be set to the specified color.

    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:
    BOX 1 FILL COLOR GREEN
    BOX 2 FILL COLOR BLUE
    BOX 1 FILL RGB COLOR 220 109 88
    BOX 2 FILL RGB COLOR 175 238 238
Note:
    Boxes can be generated in two ways. You can use the BOX ... COORDINATES command to place boxes on subsequent plots or you can use the BOX command to draw one box immediately. The BOX FILL COLOR command is used to specify the color of the box interior in either case. When the BOX command is used, the fill color is set to color of the first box (i.e., <id> is 1).
Note:
    A BOX ... FILL COLOR command with no arguments sets the box color to the default; thus BOX 1 FILL COLOR with no arguments sets the color for box 1 to the default. A BOX ... FILL COLOR command with no <id> refers to all 100 boxes; thus BOX FILL COLOR GREEN sets the color green for all 100 boxes. Note also that BOX FILL COLOR with no <id> and no arguments sets the default color for all 100 boxes.
Default:
    All box interiors are black.
Synonyms:
    None
Related Commands: Applications:
    Presentation Graphics
Implementation Date:
    Pre-1987
    2021/05: Support for RGB colors
Program 1:
     
    BOX 1 COORDINATES 18 80 23 85
    BOX 1 FILL COLOR RED
    LEGEND 1 COORDINATES 25 82
    LEGEND 1 XSUP()2
    .
    BOX 2 COORDINATES 18 73 23 78
    BOX 2 FILL COLOR BLUE
    LEGEND 2 COORDINATES 25 75
    LEGEND 2 XSUP()3
    .
    BOX FILL PATTERN SOLID
    LEGEND FONT SIMPLEX
    CHARACTER BOX BOX
    CHARACTER FILL ON ON
    CHARACTER COLOR RED BLUE
    .
    PLOT X**2 FOR X = 1 1 9 AND
    PLOT X**3 FOR X = 1 1 9
    .
    BOX FILL COLOR GREEN
    BOX 18 50 25 57
        
    plot generated by sample program
Program 2:
     
    BOX 1 COORDINATES 18 80 23 85
    BOX 1 FILL COLOR RED
    BOX 1 FILL RGB COLOR 220 20 60
    LEGEND 1 COORDINATES 25 82
    LEGEND 1 XSUP()2
    BOX 2 COORDINATES 18 73 23 78
    BOX 2 FILL COLOR BLUE
    BOX 2 FILL RGB COLOR 175 238 238
    LEGEND 2 COORDINATES 25 75
    LEGEND 2 XSUP()3
    BOX FILL PATTERN SOLID
    LEGEND FONT SIMPLEX
    CHARACTER BOX BOX
    CHARACTER FILL ON ON
    CHARACTER COLOR RED BLUE
    CHARACTER RGB COLOR 220 20 60 175 238 238
    PLOT X**2 FOR X = 1 1 9 AND
    PLOT X**3 FOR X = 1 1 9
    .
    BOX FILL COLOR GREEN
    BOX FILL RGB COLOR 0 158 115
    BOX 18 50 25 57
        
    plot generated by sample program
Date created: 05/13/2021
Last updated: 12/11/2023

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