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.   Between
18       these  points, linear interpolation is used which gives a smooth varia‐
19       tion of color with intensity index.  Any number of control  points  may
20       be  specified, located at arbitrary positions, although typically 2 - 4
21       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 cmap1
23       intensity indices.  The control points at the minimum and maximum posi‐
24       tion (0 and 1) must always be specified.  By adding more control points
25       you can get more variation.  One good technique for plotting  functions
26       that vary about some expected average is to use an additional 2 control
27       points in the center (position ~= 0.5) that are the same  lightness  as
28       the  background  (typically white for paper output, black for crt), and
29       same hue as the boundary control points.  This  allows  the  highs  and
30       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       If  RGB  colors  are provided then the interpolation takes place in RGB
37       space and is trivial. However if HLS colors are provided then,  because
38       of  the  circular nature of the color wheel for the hue coordinate, the
39       interpolation could be performed in either direction around  the  color
40       wheel. The default behaviour is for the hue to be linearly interpolated
41       ignoring this circular property of hue. So  for  example,  the  hues  0
42       (red)  and 240 (blue) will get interpolated via yellow, green and cyan.
43       If instead you wish to interpolate the other way around the color wheel
44       you  have two options. You may provide hues outside the range [0, 360),
45       so by using a hue of -120 for blue or 360  for  red  the  interpolation
46       will   proceed   via   magenta.   Alternatively  you  can  utilise  the
47       alt_hue_path variable to reverse the direction of interpolation if  you
48       need to provide hues within the [0-360) range.
49
50       Examples  of  interpolation Huealt_hue_pathcolor scheme[120 240]falseg‐
51       reen-cyan-blue[240 120]falseblue-cyan-green[120 -120]falsegreen-yellow-
52       red-magenta-blue[240         480]falseblue-magenta-red-yellow-green[120
53       240]truegreen-yellow-red-magenta-blue[240 120]trueblue-magenta-red-yel‐
54       low-green
55
56       Bounds   on  coordinatesRGBR[0,  1]magnitudeRGBG[0,  1]magnitudeRGBB[0,
57       1]magnitudeHLShue[0,  360]degreesHLSlightness[0,  1]magnitudeHLSsatura‐
58       tion[0, 1]magnitude
59
60       Redacted  form:  plscmap1l(itype,  intensity,  coord1,  coord2, coord3,
61       alt_hue_path)
62
63       This function is used in examples 8, 11, 12, 15, 20, and 21.
64

ARGUMENTS

66       itype (PLBOOL(3plplot), input)
67              true: RGB, false: HLS.
68
69       npts (PLINT(3plplot), input)
70              number of control points
71
72       intensity (PLFLT_VECTOR(3plplot), input)
73              A vector containing the cmap1 intensity index (0.0-1.0)  in  as‐
74              cending order for each control point.
75
76       coord1 (PLFLT_VECTOR(3plplot), input)
77              A  vector containing the first coordinate (H or R) for each con‐
78              trol point.
79
80       coord2 (PLFLT_VECTOR(3plplot), input)
81              A vector containing the second coordinate (L or G) for each con‐
82              trol point.
83
84       coord3 (PLFLT_VECTOR(3plplot), input)
85              A  vector containing the third coordinate (S or B) for each con‐
86              trol point.
87
88       alt_hue_path (PLBOOL_VECTOR(3plplot), input)
89              A vector (with npts - 1 elements), each containing  either  true
90              to  use the reversed HLS interpolation or false to use the regu‐
91              lar HLS interpolation.  (alt_hue_path[i] refers to the  interpo‐
92              lation  interval  between  the i and i + 1 control points). This
93              parameter is not used for RGB colors (itype = true).
94
95

AUTHORS

97       Many developers (who  are  credited  at  http://plplot.org/credits.php)
98       have contributed to PLplot over its long history.
99

SEE ALSO

101       PLplot documentation at http://plplot.org/documentation.php.
102
103
104
105                                 January, 2021              PLSCMAP1L(3plplot)
Impressum