1PLSCMAP1L(3plplot) PLplot API PLSCMAP1L(3plplot)
2
3
4
6 plscmap1l - Set color map1 colors using a piece-wise linear relation‐
7 ship
8
10 plscmap1l(itype, npts, pos, coord1, coord2, coord3, rev)
11
13 Set color map1 colors using a piece-wise linear relationship between
14 position in the color map (from 0 to 1) and position in HLS or RGB
15 color space (see the PLplot documentation). May be called at any time.
16
17 The idea here is to specify a number of control points that define the
18 mapping between palette 1 input positions (intensities) and HLS (or
19 RGB). Between these points, linear interpolation is used which gives a
20 smooth variation of color with input position. Any number of control
21 points may be specified, located at arbitrary positions, although typi‐
22 cally 2 - 4 are enough. Another way of stating this is that we are
23 traversing a given number of lines through HLS (or RGB) space as we
24 move through color map1 entries. The control points at the minimum and
25 maximum position (0 and 1) must always be specified. By adding more
26 control points you can get more variation. One good technique for
27 plotting functions that vary about some expected average is to use an
28 additional 2 control points in the center (position ~= 0.5) that are
29 the same lightness as the background (typically white for paper output,
30 black for crt), and same hue as the boundary control points. This
31 allows the highs and lows to be very easily distinguished.
32
33 Each control point must specify the position in color map1 as well as
34 three coordinates in HLS or RGB space. The first point must correspond
35 to position = 0, and the last to position = 1.
36
37 The hue is interpolated around the "front" of the color wheel
38 (red<->green<->blue<->red) unless the "rev" flag is set to true, in
39 which case interpolation (between the i and i + 1 control point for
40 rev[i]) proceeds around the back (reverse) side. Specifying rev=NULL
41 is equivalent to setting rev[]= false for every control point.
42
43 Bounds on coordinatesRGBR[0, 1]magnitudeRGBG[0, 1]magnitudeRGBB[0,
44 1]magnitudeHLShue[0, 360]degreesHLSlightness[0, 1]magnitudeHLSsatura‐
45 tion[0, 1]magnitude
46
47 Redacted form: plscmap1l(itype, pos, coord1, coord2, coord3, rev)
48
49 This function is used in examples 8,11,12,15,20,21.
50
52 itype (PLBOOL, input)
53 true: RGB, false: HLS.
54
55 npts (PLINT, input)
56 number of control points
57
58 pos (PLFLT *, input)
59 position for each control point (between 0.0 and 1.0, in ascend‐
60 ing order)
61
62 coord1 (PLFLT *, input)
63 first coordinate (H or R) for each control point
64
65 coord2 (PLFLT *, input)
66 second coordinate (L or G) for each control point
67
68 coord3 (PLFLT *, input)
69 third coordinate (S or B) for each control point
70
71 rev (PLBOOL: *, input)
72 reverse flag for each control point. (rev[i] refers to the
73 interpolation interval between the i and i + 1 control points).
74
75
77 Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This
78 man page was automatically generated from the DocBook source of the
79 PLplot documentation, maintained by Alan W. Irwin and Rafael
80 Laboissiere.
81
83 PLplot documentation at http://plplot.sourceforge.net/resources.
84
85
86
87 July, 2010 PLSCMAP1L(3plplot)