1PLSHADE(3plplot) PLplot API PLSHADE(3plplot)
2
3
4
6 plshade - Shade individual region on the basis of value
7
9 plshade(a, nx, ny, defined, xmin, xmax, ymin, ymax, shade_min,
10 shade_max, sh_cmap, sh_color, sh_width, min_color, min_width,
11 max_color, max_width, fill, rectangular, pltr, pltr_data)
12
14 Shade individual region on the basis of value. Use plshades(3plplot)
15 if you want to shade a number of contiguous regions using continuous
16 colors. In particular the edge contours are treated properly in
17 plshades(3plplot). If you attempt to do contiguous regions with
18 plshade(3plplot) the contours at the edge of the shade are partially
19 obliterated by subsequent plots of contiguous shaded regions.
20
21 Redacted form: General: plshade(a, defined, xmin, xmax, ymin, ymax,
22 shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color,
23 min_width, max_color, max_width, fill, rectangular, pltr, pltr_data)
24
25
26 This function is used in example 15.
27
29 a (PLFLT_MATRIX(3plplot), input)
30 A matrix containing function values to plot. Should have dimen‐
31 sions of nx by ny.
32
33 nx (PLINT(3plplot), input)
34 First dimension of the matrix "a".
35
36 ny (PLINT(3plplot), input)
37 Second dimension of the matrix "a".
38
39 defined (PLDEFINED_callback(3plplot), input)
40 Callback function specifying the region that should be plotted
41 in the shade plot. This function accepts x and y coordinates as
42 input arguments and must return 1 if the point is to be included
43 in the shade plot and 0 otherwise. If you want to plot the en‐
44 tire shade plot (the usual case), this argument should be set to
45 NULL.
46
47 xmin, xmax, ymin, ymax (PLFLT(3plplot), input)
48 See the discussion of pltr below for how these arguments are
49 used (only for the special case when the callback function pltr
50 is not supplied).
51
52 shade_min (PLFLT(3plplot), input)
53 Defines the lower end of the interval to be shaded. If shade_max
54 <= shade_min, plshade(3plplot) does nothing.
55
56 shade_max (PLFLT(3plplot), input)
57 Defines the upper end of the interval to be shaded. If shade_max
58 <= shade_min, plshade(3plplot) does nothing.
59
60 sh_cmap (PLINT(3plplot), input)
61 Defines color map. If sh_cmap=0, then sh_color is interpreted as
62 a cmap0 (integer) index. If sh_cmap=1, then sh_color is inter‐
63 preted as a cmap1 argument in the range (0.0-1.0).
64
65 sh_color (PLFLT(3plplot), input)
66 Defines color map index with integer value if cmap0 or value in
67 range (0.0-1.0) if cmap1.
68
69 sh_width (PLFLT(3plplot), input)
70 Defines width used by the fill pattern.
71
72 min_color (PLINT(3plplot), input)
73 Defines pen color, width used by the boundary of shaded region.
74 The min values are used for the shade_min boundary, and the max
75 values are used on the shade_max boundary. Set color and width
76 to zero for no plotted boundaries.
77
78 min_width (PLFLT(3plplot), input)
79 Defines pen color, width used by the boundary of shaded region.
80 The min values are used for the shade_min boundary, and the max
81 values are used on the shade_max boundary. Set color and width
82 to zero for no plotted boundaries.
83
84 max_color (PLINT(3plplot), input)
85 Defines pen color, width used by the boundary of shaded region.
86 The min values are used for the shade_min boundary, and the max
87 values are used on the shade_max boundary. Set color and width
88 to zero for no plotted boundaries.
89
90 max_width (PLFLT(3plplot), input)
91 Defines pen color, width used by the boundary of shaded region.
92 The min values are used for the shade_min boundary, and the max
93 values are used on the shade_max boundary. Set color and width
94 to zero for no plotted boundaries.
95
96 fill (PLFILL_callback(3plplot), input)
97 Routine used to fill the region. Use plfill(3plplot). Future
98 version of PLplot may have other fill routines.
99
100 rectangular (PLBOOL(3plplot), input)
101 Set rectangular to true if rectangles map to rectangles after
102 coordinate transformation with pltrl. Otherwise, set rectangu‐
103 lar to false. If rectangular is set to true, plshade tries to
104 save time by filling large rectangles. This optimization fails
105 if the coordinate transformation distorts the shape of rectan‐
106 gles. For example a plot in polar coordinates has to have rec‐
107 tangular set to false.
108
109 pltr (PLTRANSFORM_callback(3plplot), input)
110 A callback function that defines the transformation between the
111 zero-based indices of the matrix a and world coordinates. If
112 pltr is not supplied (e.g., is set to NULL in the C case), then
113 the x indices of a are mapped to the range xmin through xmax and
114 the y indices of a are mapped to the range ymin through ymax.For
115 the C case, transformation functions are provided in the PLplot
116 library: pltr0(3plplot) for the identity mapping, and
117 pltr1(3plplot) and pltr2(3plplot) for arbitrary mappings respec‐
118 tively defined by vectors and matrices. In addition, C callback
119 routines for the transformation can be supplied by the user such
120 as the mypltr function in examples/c/x09c.c which provides a
121 general linear transformation between index coordinates and
122 world coordinates.For languages other than C you should consult
123 the PLplot documentation for the details concerning how PLTRANS‐
124 FORM_callback(3plplot) arguments are interfaced. However, in
125 general, a particular pattern of callback-associated arguments
126 such as a tr vector with 6 elements; xg and yg vectors; or xg
127 and yg matrices are respectively interfaced to a linear-trans‐
128 formation routine similar to the above mypltr function;
129 pltr1(3plplot); and pltr2(3plplot). Furthermore, some of our
130 more sophisticated bindings (see, e.g., the PLplot documenta‐
131 tion) support native language callbacks for handling index to
132 world-coordinate transformations. Examples of these various ap‐
133 proaches are given in examples/<language>x09*, examples/<lan‐
134 guage>x16*, examples/<language>x20*, examples/<language>x21*,
135 and examples/<language>x22*, for all our supported languages.
136
137 pltr_data (PLPointer(3plplot), input)
138 Extra parameter to help pass information to pltr0(3plplot),
139 pltr1(3plplot), pltr2(3plplot), or whatever routine that is ex‐
140 ternally supplied.
141
142
144 Many developers (who are credited at http://plplot.org/credits.php)
145 have contributed to PLplot over its long history.
146
148 PLplot documentation at http://plplot.org/documentation.php.
149
150
151
152 February, 2022 PLSHADE(3plplot)