1PLSCMAP1L(3plplot)                PLplot API                PLSCMAP1L(3plplot)
2
3
4

NAME

6       plscmap1l - Set cmap1 colors using a piece-wise linear relationship
7

SYNOPSIS

9       plscmap1l(itype, npts, intensity, coord1, coord2, coord3, alt_hue_path)
10

DESCRIPTION

12       Set  cmap1  colors  using  a piece-wise linear relationship between the
13       cmap1 intensity index (0.0-1.0) and position in HLS or RGB color  space
14       (see the PLplot documentation).  May be called at any time.
15
16       The  idea here is to specify a number of control points that define the
17       mapping between  input  cmap1  intensity  indices  and  HLS  (or  RGB).
18       Between these points, linear interpolation is used which gives a smooth
19       variation of color with intensity index.  Any number of control  points
20       may  be specified, located at arbitrary positions, although typically 2
21       - 4 are enough. Another way of stating this is that we are traversing a
22       given  number  of  lines  through HLS (or RGB) space as we move through
23       cmap1 intensity indices.  The control points at the minimum and maximum
24       position  (0  and  1) must always be specified.  By adding more control
25       points you can get more variation.  One  good  technique  for  plotting
26       functions that vary about some expected average is to use an additional
27       2 control points in the center (position ~=  0.5)  that  are  the  same
28       lightness  as  the  background (typically white for paper output, black
29       for crt), and same hue as the boundary control points.  This allows the
30       highs and lows to be very easily distinguished.
31
32       Each control point must specify the cmap1 intensity index and the asso‐
33       ciated three coordinates in HLS or RGB space.   The  first  point  must
34       correspond to position = 0, and the last to position = 1.
35
36       The  default  behaviour  is  for  the  hue  to be linearly interpolated
37       between the control points. Since the hue lies in the  range  [0,  360]
38       this corresponds to interpolation around the "front" of the color wheel
39       (red<->green<->blue<->red). If alt_hue_path[i] is true, then an  alter‐
40       native  interpolation  is  used  between  control  points i and i+1. If
41       hue[i+1]-hue[i] > 0 then interpolation is between hue[i] and hue[i+1] -
42       360, otherwise between hue[i] and hue[i+1] + 360. You can consider this
43       as interpolation around the "back" or "reverse"  of  the  color  wheel.
44       Specifying  alt_hue_path=NULL is equivalent to setting alt_hue_path[] =
45       false for every control point.
46
47       Examples of interpolation Huealt_hue_pathcolor  scheme[120  240]falseg‐
48       reen-cyan-blue[240  120]falseblue-cyan-green[120  240]truegreen-yellow-
49       red-magenta-blue[240 120]trueblue-magenta-red-yellow-green
50
51       Bounds  on  coordinatesRGBR[0,  1]magnitudeRGBG[0,   1]magnitudeRGBB[0,
52       1]magnitudeHLShue[0,  360]degreesHLSlightness[0,  1]magnitudeHLSsatura‐
53       tion[0, 1]magnitude
54
55       Redacted form:  plscmap1l(itype,  intensity,  coord1,  coord2,  coord3,
56       alt_hue_path)
57
58       This function is used in examples 8, 11, 12, 15, 20, and 21.
59

ARGUMENTS

61       itype (PLBOOL(3plplot), input)
62              true: RGB, false: HLS.
63
64       npts (PLINT(3plplot), input)
65              number of control points
66
67       intensity (PLFLT_VECTOR(3plplot), input)
68              A  vector  containing  the  cmap1  intensity  index (0.0-1.0) in
69              ascending order for each control point.
70
71       coord1 (PLFLT_VECTOR(3plplot), input)
72              A vector containing the first coordinate (H or R) for each  con‐
73              trol point.
74
75       coord2 (PLFLT_VECTOR(3plplot), input)
76              A vector containing the second coordinate (L or G) for each con‐
77              trol point.
78
79       coord3 (PLFLT_VECTOR(3plplot), input)
80              A vector containing the third coordinate (S or B) for each  con‐
81              trol point.
82
83       alt_hue_path (PLBOOL_VECTOR(3plplot), input)
84              A  vector  (with  npts  - 1 elements) containing the alternative
85              interpolation method Boolean value for each control point inter‐
86              val.   (alt_hue_path[i]  refers  to  the  interpolation interval
87              between the i and i + 1 control points).
88
89

AUTHORS

91       Many   developers   (who   are   credited   at    http://plplot.source
92       forge.net/credits.php)  have  contributed  to PLplot over its long his‐
93       tory.
94

SEE ALSO

96       PLplot   documentation   at    http://plplot.sourceforge.net/documenta
97       tion.php.
98
99
100
101                                 August, 2017               PLSCMAP1L(3plplot)
Impressum