C-PLOT

Scientific Graphics and Data Analysis

9.11.1. - Pen numbering



C-PLOT graphics filters are written to conform to the pen-numbering conventions described in this section. These conventions allow a command file to produce consistent plots on pen plotters, laser printers and mono or color video monitors.

The plot program itself doesn't distinguish among pen numbers (except to ignore numbers greater than 1000 when selecting the pen-plotter pen). The number entered with the z# command is simply passed on to a graphics filter. The code in each filter can use or ignore the pen number, depending on the device characteristics. Not all pen numbers will be functional on all filters.

Line-width values are interpreted in C-PLOT basic units, where there are 40 basic units in 1 C-PLOT millimeter. A line width of zero should select the thinnest line available on a device.

The following table shows the recommended correspondence between pen number and attribute:

 0-999   drawing colors   4000-4999   line widths 
 1000-1999   white-fill fill colors   5000-5999   symbol outline widths 
 2000-2999   black-fill fill colors   9000-9999   flags 
 3000-3999   background colors   9100-9900   filter-dependent flags 



The colors associated with pen numbers 1000 through 3999 modulus 1000 are to be the same as the colors associated with pen numbers 0 through 999.

Pens 0, 1000, 2000 and 3000 track the background color assigned with pens 3002-3999. By drawing with pen 0, you can erase previously drawn portions of the plots. Pens 1, 1001, 2001 and 3001 track the foreground color assigned with pens 10-999.

The following 9000-series flags have been defined:

 9001   turns symbol filling on 
 9002   turns symbol filling off 
 9003   turns black-filled symbol outlines on 
 9004   turns black-filled symbol outlines off 
 9999   resets all attributes to startup default values 



When symbol filling is on, the interior of the symbols is painted solidly with the fill color. When off, white-filled symbols show through what is underneath, and black-filled symbols are colored by drawing a grid of lines. The startup default is to have symbol filling on.

The white-filled symbols are those selected with the sy command using symbol codes 0, 1, 2, 3, 8, 12, 14-28. The black-filled symbols have symbol codes 4, 5, 6, 7, 10, 11 and 13. White-filled symbols are always outlined by the current line color. Black-filled symbols are outlined with the current background color or not at all if the no-outline flag has been selected. The startup default is to have black-filled symbol outlines drawn.

The following pen color assignments are standardized for color display devices:

 0 -- background   5 -- yellow 
 1 -- foreground   6 -- cyan (blue-green) 
 2 -- blue   7 -- magenta (blue-red) 
 3 -- red   8 -- white 
 4 -- green   9 -- black 

The colors for VGA and EGA graphics on 386 and 486 PC computers are as follows:

 0 -- black   \09 -- black 
 1 -- bright white   10 -- light blue 
 2 -- blue   11 -- light green 
 3 -- red   12 -- light cyan 
 4 -- green   13 -- light red 
 5 -- yellow   14 -- light magenta 
 6 -- cyan   15 -- brown 
 7 -- magenta   16 -- gray 
 8 -- bright white   17 -- white 




The colors available on X Windows, SunView, color PostScript and HP-GL follow:

 \00 -- white   38 -- olive drab 
 \01 -- black   39 -- medium sea green 
 \02 -- blue   40 -- med. spring green 
 \03 -- red   41 -- pale green 
 \04 -- green   42 -- sea green 
 \05 -- yellow   43 -- spring green 
 \06 -- cyan   44 -- yellow green 
 \07 -- magenta   45 -- dark slate gray 
 \08 -- white   46 -- dim gray 
 \09 -- black   47 -- light gray 
 10 -- aquamarine   48 -- gray 
 11 -- med. aquamarine   49 -- khaki 
 12 -- blue   50 -- magenta 
 13 -- cadet blue   51 -- maroon 
 14 -- cornflower blue   52 -- orange 
 15 -- dark slate blue   53 -- orchid 
 16 -- light blue   54 -- dark orchid 
 17 -- light steel blue   55 -- medium orchid 
 18 -- medium blue   56 -- pink 
 19 -- med. slate blue   57 -- plum 
 20 -- midnight blue   58 -- red 
 21 -- navy blue   59 -- Indian red 
 22 -- sky blue   60 -- medium violet red 
 23 -- slate blue   61 -- orange red 
 24 -- steel blue   62 -- violet red 
 25 -- coral   63 -- salmon 
 26 -- cyan   64 -- sienna 
 27 -- firebrick   65 -- tan 
 28 -- brown   66 -- thistle 
 29 -- sandy brown   67 -- turquoise 
 30 -- gold   68 -- dark turquoise 
 31 -- goldenrod   69 -- medium turquoise 
 32 -- light goldenrod   70 -- violet 
 33 -- green   71 -- blue violet 
 34 -- dark green   72 -- wheat 
 35 -- dark olive green   73 -- yellow 
 36 -- forest green   74 -- green yellow 
 37 -- lime green 

Colors 75 to 175 are 101 shades of gray from black to white.