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: Colors

Dataplot Supports 89 Colors You can specify 89 different colors within Dataplot. A given output device (monitor, laser printer, penplotter) may or may not have the capacity to generate all 89 colors; if the capacity does not exist, then a mapping of the 89 colors onto a subset supported by the particular device will occur.
Colors Can Be Specified with Either a Name or an Index Colors can be specified with either a name or an index. For example,
    CHARACTER COLOR YELLOW or
    CHARACTER COLOR 8

    LINE COLOR YELLOW or
    LINE COLOR 8

Index Maps to a Specific Color In Dataplot, an index maps to a specific color (e.g., index 3 is equivalent to BLUE). The advantage of this is that names and indices are consistent across devices. The disadvantage is that using indices for colors can be somewhat counter intuitive on a specific device. For example, the VGA device supports 15 colors. However, using indices 1 through 15 will not yield 15 unique colors on the VGA.
Within Dataplot, you can view a file that lists the index to color mapping by entering the command
    LIST COLORS. (be sure to include the trailing .)
This file also gives information regarding how many colors various graphics devices available in Dataplot actually support.
Color Support on Specific Graphics Devices The following graphics devices support all 89 colors.
  • X11
  • POSTSCRIPT
  • SVG (Scalable Vector Graphis)
  • CGM
  • QWIN in True Color mode (command line version of Dataplot on Windows using the Microsoft/Compaq/Intel compiler)
The following graphics devices support 15 colors.
  • QWIN (not in true color mode) - white, black, red, blue, green, magenta, cyan, yellow, light cyan, light blue, gray, light gray, dark gray, red2, magenta2
The following graphics devices support 8 colors:
  • TEKTRONIX 4115 - white, black, red, blue, green, magenta, cyan, yellow
  • TEKTRONIX 42XX - white, black, red, blue, green, magenta, cyan, yellow
  • TEKTRONIX 43XX - white, black, red, blue, green, magenta, cyan, yellow
  • TEKTRONIX 4027 - white, black, red, blue, green, purple, orange, yellow
  • HPGL (non-9872 models) - black, red, blue, green, magenta, orange, cyan, yellow
  • HP 2622 - white, black, red, blue, green, magenta, cyan, yellow
  • GENERAL - white, black, red, blue, green, magenta, cyan, yellow
The following graphics devices support 7 colors:

  • SUN/SUNVIEW - white, black, red, blue, green, magenta, yellow
The following graphics devices support 4 colors:
  • HPGL (9872 model) - black, red, blue, green
  • TEKTRONIX 4662 - black, red, blue, green
  • CALCOMP - black, red, blue, green
  • ZETA - black, red, blue, green
Displaying the Color Mapping for a Specific Graphics Device For details of the color mapping for a device, use the SHOW command, as in
    SHOW CALCOMP COLORS
    SHOW VGA COLORS
To capture such a listing to a file (e.g., JUNK.), which may be viewed either within Dataplot via the LIST command or later upon exit from Dataplot, enter
    CAPTURE JUNK.
    SHOW CALCOMP COLORS
    END OF CAPTURE
    LIST JUNK.

    CAPTURE JUNK.
    SHOW VGA COLORS
    END OF CAPTURE
    LIST JUNK.

Penplotters Are a Special Case Penplotters are a special case in two ways.
  1. First, different models may support a varying number of pens. For the more common plotter models, the user can set the number of slots (e.g., SET CALCOMP COLORS 16).
  2. Second, penplotters provide a "slot" into which the user can load an arbitrary pen. When Dataplot sets a color for penplotter, it maps a color to a fixed slot (e.g., BLUE goes to slot 3 which may or may not actually contain a blue pen). The <device> PEN MAP command can be used to define the color to slot number mapping for plotters.

Table Showing Supported Colors in Dataplot The following table shows the supported colors in Dataplot. It shows both the name and corresponding index number. The last column shows the actual color that the VGA device will generate for the requested color (use the SHOW COLORS <device> command to see this for other devices).

Magenta
Dataplot Color Table
Color Dataplot
Name
Dataplot
Index
VGA Output
(15-color)
White WHITE 0 White
Black BLACK 1 Black
Red RED 2 Red
Blue BLUE 3 Blue
Green GREEN 4 Green
Magenta MAGENTA 5 Magenta
Orange ORANGE 6 Orange
Cyan CYAN 7 Cyan
Yellow YELLOW 8 Yellow
Yellow Green YGRE 9 Yellow
Dark Green DGRE 10 Green
Light Blue LBLU 11 Light Blue
Blue Violet VBLU 12 Blue
Violet Red VRED 13 Red
Dark Slate Gray DGRA 14 Dark gray
Light Gray LGRA 15 Light Gray
Aquamarine AQUA 16 Cyan
Brown BROWN 17 Brown
Cadet Blue CABL 18 Light Blue
Coral CORAL 19 Light RED
Cornflower Blue CBLU 20 Blue
Dark Olive Green DOGR 21 Green
Dark Orchid DORC 22 Magenta
Dark Slate Blue DSBL 23 Blue
Dark Turquoise DTUR 24 Magenta
Firebrick FIRE 25 Yellow
Forest Green FGRE 26 Green
Gold GOLD 27 Yellow
Goldenrod GLDR 28 Yellow
Gray GRAY 29 Gray
Indian Red IRED 30 Light Red
Khaki KHAKI 31 YELLOW
Dim Gray DMGR 32 Light Gray
Light Blue Steel LSBL 33 Light Blue
Lime Green LGRE 34 Green
Maroon MAROON 35 Magenta
Medium Aquamarine MAQU 36 Light Cyan
Medium Blue MBLU 37 Light Blue
Medium Forest Green MFGR 38 Green
Medium Goldenrod MGLD 39 Yellow
Medium Orchid MORC 40
Medium Sea Green MSGR 41 Green
Medium Slate Blue MSBL 42 Light Blue
Medium Spring Green MSPG 43 Green
Medium Turquoise MTUR 44 Light Magenta
Medium Violet Red MVRD 45 Magenta
Midnight Blue MDBL 46 Blue
Navy NAVY 47 Blue
Orange Red ORED 48 Red
Orchid ORCHID 49 Light Magenta
Pale Green PGRE 50 Green
Pink PINK 51 Red
Plum PLUM 52 Magenta
Purple PURPLE 53 Magenta
Salmon Salmon 54 Yellow
Sea Green SGRE 55 Green
Sienna SIENNA 56 Magenta
Sky Blue SKBL 57 Light Cyan
Slate Blue SBLU 58 Blue
Spring Green SPGR 59 Green
Steel Blue STBL 60 Blue
Tan TAN 61 Brown
Thistle THISTLE 62 Yellow
Turquoise TURQ 63 Magenta
Violet VIOLET 64 Magenta
Wheat WHEAT 65 Yellow
Green Yellow GYEL 66 Green
Light Cyan LCYA 67 light Cyan
Blue2 BLU2 68 Blue
Blue3 BLU3 69
Blue4 BLU4 70 Blue
Cyan2 CYA2 71 Cyan
Cyan3 CYA3 72 Cyan
Cyan4 CYA4 73 Cyan
Green2 GRE2 74 Green
Green3 GRE3 75 Green
Green4 GRE4 76 Green
Yellow2 YEL2 77 Yellow
Yellow3 YEL3 78 Yellow
Yellow4 YEL4 79 Yellow
Orange2 ORA2 80 Yellow
Orange3 ORA3 81 Yellow
Orange4 ORA4 82 Yellow
Red2 RED2 83 Red
Red3 RED3 84 Red
Red4 RED4 85 Red
Magenta2 MAG2 86 Magenta
Magenta3 MAG3 87 Magenta
Magenta4 MAG4 88 Magenta

Gray Scale In addition, gray scale can be specified with the following scheme.

G0 Black
G1-G99 Gray scale from black to white
G100 White

Negative Indices for Gray Scales Gray scales can also be specified with negative indices (-1 through -100). Currently, Postscript and X11 support gray scale. Other devices will map gray scale to either black or white.
Colors Can Have a Different Appearance on Different Graphics Devices Be aware that different hardware devices can render a given color quite differently. For some graphics devices, the colors are essentially fixed and Dataplot simply tries to map a Dataplot color to the closes available color on that device (in some cases, the choices are a bit arbitrary). Even for devices that support full RGB (Red, Green, Blue, each represented by an integer value in the range 0 to 255) specification (e.g., Postscript, X11, SVG), there can be differences in the colors actually rendered. Dataplot specificies a consistent set of RGB values, but this does not garauntee that the color will look the same on different hardware.
Dataplot Graph Showing Different Colors The following graph shows the Dataplot colors from a Postscript device.

Plot showing Dataplot colors from Postscript device

Dataplot Program to Demonstrate Colors The Dataplot program that generated the above color graph follows.
    let x1 = 5
    let xinc = 10
    let x2 = x1 + xinc
    let yinc = 3
    let y1 = 97
    margin x1
    vertical spacing 3
    crlf on
    line thickness 2.5
    .
    line color white; draw x1 y1 x2 y1; text white; let y1 = y1 - yinc
    line color black; draw x1 y1 x2 y1; text black; let y1 = y1 - yinc
    line color red; draw x1 y1 x2 y1; text red; let y1 = y1 - yinc
    line color blue; draw x1 y1 x2 y1; text blue; let y1 = y1 - yinc
    line color green; draw x1 y1 x2 y1; text green; let y1 = y1 - yinc
    line color magenta; draw x1 y1 x2 y1; text magenta; let y1 = y1 - yinc
    line color orange; draw x1 y1 x2 y1; text orange; let y1 = y1 - yinc
    line color cyan; draw x1 y1 x2 y1; text cyan; let y1 = y1 - yinc
    line color YELLOW; draw x1 y1 x2 y1; text yellow; let y1 = y1 - yinc
    line color YGRE; draw x1 y1 x2 y1; text YGRE; let y1 = y1 - yinc
    line color DGRE; draw x1 y1 x2 y1; text DGRE; let y1 = y1 - yinc
    line color lblu; draw x1 y1 x2 y1; text lblu; let y1 = y1 - yinc
    line color vblu; draw x1 y1 x2 y1; text vblu; let y1 = y1 - yinc
    line color vred; draw x1 y1 x2 y1; text vred; let y1 = y1 - yinc
    line color dgra; draw x1 y1 x2 y1; text dgra; let y1 = y1 - yinc
    line color lgra; draw x1 y1 x2 y1; text lgra; let y1 = y1 - yinc
    line color aqua; draw x1 y1 x2 y1; text aqua; let y1 = y1 - yinc
    line color brow; draw x1 y1 x2 y1; text brown; let y1 = y1 - yinc
    line color cabl; draw x1 y1 x2 y1; text cabl; let y1 = y1 - yinc
    line color coral; draw x1 y1 x2 y1; text coral; let y1 = y1 - yinc
    line color cblu; draw x1 y1 x2 y1; text cblu; let y1 = y1 - yinc
    line color dogr; draw x1 y1 x2 y1; text dogr; let y1 = y1 - yinc
    line color dorc; draw x1 y1 x2 y1; text dorc; let y1 = y1 - yinc
    line color dsbl; draw x1 y1 x2 y1; text dsbl; let y1 = y1 - yinc
    line color dtur; draw x1 y1 x2 y1; text dtur; let y1 = y1 - yinc
    line color fire; draw x1 y1 x2 y1; text fire; let y1 = y1 - yinc
    line color fgre; draw x1 y1 x2 y1; text fgre; let y1 = y1 - yinc
    line color gold; draw x1 y1 x2 y1; text gold; let y1 = y1 - yinc
    line color gldr; draw x1 y1 x2 y1; text gldr; let y1 = y1 - yinc
    line color gray; draw x1 y1 x2 y1; text gray; let y1 = y1 - yinc
    .
    let x1 = 30
    let x2 = x1 + xinc
    let y1 = 97
    line color ired; draw x1 y1 x2 y1; text ired; let y1 = y1 - yinc
    line color khak; draw x1 y1 x2 y1; text khak; let y1 = y1 - yinc
    line color dmgr; draw x1 y1 x2 y1; text dmgr; let y1 = y1 - yinc
    line color lsbl; draw x1 y1 x2 y1; text lsbl; let y1 = y1 - yinc
    line color lgre; draw x1 y1 x2 y1; text lgre; let y1 = y1 - yinc
    line color maro; draw x1 y1 x2 y1; text maroon; let y1 = y1 - yinc
    line color maqu; draw x1 y1 x2 y1; text maqu; let y1 = y1 - yinc
    line color mblu; draw x1 y1 x2 y1; text mblu; let y1 = y1 - yinc
    line color mfgr; draw x1 y1 x2 y1; text mfgr; let y1 = y1 - yinc
    line color mgld; draw x1 y1 x2 y1; text mgld; let y1 = y1 - yinc
    line color morc; draw x1 y1 x2 y1; text morc; let y1 = y1 - yinc
    line color msgr; draw x1 y1 x2 y1; text msgr; let y1 = y1 - yinc
    line color msbl; draw x1 y1 x2 y1; text msbl; let y1 = y1 - yinc
    line color mspg; draw x1 y1 x2 y1; text mspg; let y1 = y1 - yinc
    line color mtur; draw x1 y1 x2 y1; text mtur; let y1 = y1 - yinc
    line color mvrd; draw x1 y1 x2 y1; text mvrd; let y1 = y1 - yinc
    line color mdbl; draw x1 y1 x2 y1; text mdbl; let y1 = y1 - yinc
    line color navy; draw x1 y1 x2 y1; text navy; let y1 = y1 - yinc
    line color ored; draw x1 y1 x2 y1; text ored; let y1 = y1 - yinc
    line color orch; draw x1 y1 x2 y1; text orch; let y1 = y1 - yinc
    line color pgre; draw x1 y1 x2 y1; text pgre; let y1 = y1 - yinc
    line color pink; draw x1 y1 x2 y1; text pink; let y1 = y1 - yinc
    line color plum; draw x1 y1 x2 y1; text plum; let y1 = y1 - yinc
    line color purp; draw x1 y1 x2 y1; text purple; let y1 = y1 - yinc
    line color salm; draw x1 y1 x2 y1; text salmon; let y1 = y1 - yinc
    line color sgre; draw x1 y1 x2 y1; text sgre; let y1 = y1 - yinc
    line color sien; draw x1 y1 x2 y1; text sienna; let y1 = y1 - yinc
    line color skbl; draw x1 y1 x2 y1; text skbl; let y1 = y1 - yinc
    line color sblu; draw x1 y1 x2 y1; text sblu; let y1 = y1 - yinc
    line color spgr; draw x1 y1 x2 y1; text spgr; let y1 = y1 - yinc
    .
    let x1 = 55
    let x2 = x1 + xinc
    let y1 = 97
    line color stbl; draw x1 y1 x2 y1; text stbl; let y1 = y1 - yinc
    line color tan; draw x1 y1 x2 y1; text tan; let y1 = y1 - yinc
    line color this; draw x1 y1 x2 y1; text thistle; let y1 = y1 - yinc
    line color turq; draw x1 y1 x2 y1; text turquoise; let y1 = y1 - yinc
    line color viol; draw x1 y1 x2 y1; text violet; let y1 = y1 - yinc
    line color whea; draw x1 y1 x2 y1; text wheat; let y1 = y1 - yinc
    line color gyel; draw x1 y1 x2 y1; text gyel; let y1 = y1 - yinc
    line color lcya; draw x1 y1 x2 y1; text lcyan; let y1 = y1 - yinc
    line color blu2; draw x1 y1 x2 y1; text blu2; let y1 = y1 - yinc
    line color blu3; draw x1 y1 x2 y1; text blu3; let y1 = y1 - yinc
    line color blu4; draw x1 y1 x2 y1; text blu4; let y1 = y1 - yinc
    line color cya2; draw x1 y1 x2 y1; text cya2; let y1 = y1 - yinc
    line color cya3; draw x1 y1 x2 y1; text cya3; let y1 = y1 - yinc
    line color cya4; draw x1 y1 x2 y1; text cya4; let y1 = y1 - yinc
    line color gre2; draw x1 y1 x2 y1; text gre2; let y1 = y1 - yinc
    line color gre3; draw x1 y1 x2 y1; text gre3; let y1 = y1 - yinc
    line color gre4; draw x1 y1 x2 y1; text gre4; let y1 = y1 - yinc
    line color yel2; draw x1 y1 x2 y1; text yel2; let y1 = y1 - yinc
    line color yel3; draw x1 y1 x2 y1; text yel3; let y1 = y1 - yinc
    line color yel4; draw x1 y1 x2 y1; text yel4; let y1 = y1 - yinc
    line color ora2; draw x1 y1 x2 y1; text ora2; let y1 = y1 - yinc
    line color ora3; draw x1 y1 x2 y1; text ora3; let y1 = y1 - yinc
    line color ora4; draw x1 y1 x2 y1; text ora4; let y1 = y1 - yinc
    line color red2; draw x1 y1 x2 y1; text red2; let y1 = y1 - yinc
    line color red3; draw x1 y1 x2 y1; text red3; let y1 = y1 - yinc
    line color red4; draw x1 y1 x2 y1; text red4; let y1 = y1 - yinc
    line color mag2; draw x1 y1 x2 y1; text mag2; let y1 = y1 - yinc
    line color mag3; draw x1 y1 x2 y1; text mag3; let y1 = y1 - yinc
    line color mag4; draw x1 y1 x2 y1; text mag4; let y1 = y1 - yinc
    .
    let x1 = 80
    let x2 = x1 + xinc
    let y1 = 97
    line color g10; draw x1 y1 x2 y1; text g10; let y1 = y1 - yinc
    line color g20; draw x1 y1 x2 y1; text g20; let y1 = y1 - yinc
    line color g30; draw x1 y1 x2 y1; text g30; let y1 = y1 - yinc
    line color g40; draw x1 y1 x2 y1; text g40; let y1 = y1 - yinc
    line color g50; draw x1 y1 x2 y1; text g50; let y1 = y1 - yinc
    line color g60; draw x1 y1 x2 y1; text g60; let y1 = y1 - yinc
    line color g70; draw x1 y1 x2 y1; text g70; let y1 = y1 - yinc
    line color g80; draw x1 y1 x2 y1; text g80; let y1 = y1 - yinc
    line color g90; draw x1 y1 x2 y1; text g90; let y1 = y1 - yinc

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 6/5/2001
Last updated: 10/30/2013

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