Previous: setpis Up: ../plot79_s.html Next: setppa


SETPN

       SUBROUTINE  SETPN (PEN)
 C$    (Set Pen Number)
 C$    Select an  integer  pen  number  in  the  range  0..(device
 C$    limit).  The  default is  PEN =  1, for  which the  current
 C$    values  of  color, linewidth, linestyle, and intensity take
 C$    effect.   The meaning of  a pen  number will usually depend
 C$    upon prior agreement with the plotter operator.
 C$
 C$    For devices that provide color but do not really have pens,
 C$    the concept  of a pen  is  still  useful.    The convention
 C$    adopted by the device driver libraries is that a pen number
 C$    in 0 .. 255 is equivalent to a CORE standard color with the
 C$    same number:
 C$
 C$                      Index  Color   (R G B)
 C$                      =====  =====   =======
 C$                        0    Black   (0 0 0), or device default
 C$                        1    Red     (1 0 0)
 C$                        2    Green   (0 1 0)
 C$                        3    Yellow  (1 1 0)
 C$                        4    Blue    (0 0 1)
 C$                        5    Magenta (1 0 1)
 C$                        6    Cyan    (0 1 1)
 C$                        7    White   (1 1 1), or complement of
 C$                                              the default.
 C$                      8..255 Index into the device-dependent
 C$                             color table.
 C$
 C$    Pen 0 is therefore the background color,  and could be used
 C$    for erasing on devices that support that operation.
 C$
 C$    Pen numbers in the  range 256 .. 9999 are  taken  modulo 7,
 C$    plus 1, so they map onto standard foreground colors 1..7.
 C$
 C$    Larger pen  numbers encode  in their digits hue, lightness,
 C$    and saturation as hhhllss, with hhh in 1..360, ll in 0..99,
 C$    and  ss in 0..99.   Some representative colors  chosen this
 C$    way are:
 C$
 C$                 color       H    L   S        COLOR
 C$               ============ ===  == ===      =======
 C$               light grey     0  75   0        17500
 C$               medium grey    0  50   0        15000
 C$               dark grey      0  25   0        12500
 C$               dark blue      0  50 100        15099
 C$               dark green   240  25  25      2402525
 C$               firebrick    120  35  60      1203560
 C$               gold         150  50  60      1505060
 C$               maroon        80  35  60       803560
 C$               pink         120  65  25      1206525
 C$               sienna       160  35  60      1603560
 C$               tan          140  65  60      1406560
 C$               ============ ===  == ===      =======
 C$
 C$    (09-Jan-1991)