1PLSHADE1(3plplot) PLplot API PLSHADE1(3plplot)
2
3
4
6 plshade1 - Shade individual region on the basis of value
7
9 plshade1(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 plshade1(3plplot) (or plshade(3plplot)) the contours at the edge of the
19 shade are partially obliterated by subsequent plots of contiguous
20 shaded regions. plshade1(3plplot) differs from plshade(3plplot) by the
21 type of the first argument. Look at the argument list below,
22 plcont(3plplot) and the PLplot documentation for more information about
23 the transformation from grid to world coordinates. Shading NEEDS DOCU‐
24 MENTATION, but as a stopgap look at how plshade(3plplot) is used in
25 examples/c/x15c.c
26
27 Redacted form: General: plshade1(a, defined, xmin, xmax, ymin, ymax,
28 shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color,
29 min_width, max_color, max_width, fill, rectangular, pltr, pltr_data)
30 Perl/PDL: plshade1(a, xmin, xmax, ymin, ymax, shade_min, shade_max,
31 sh_cmap, sh_color, sh_width, min_color, min_width, max_color,
32 max_width, fill, rectangular, defined, pltr, pltr_data)
33
34
35 This function is used in example 15.
36
38 a (PLFLT *, input)
39 Contains array to be plotted. The array must have been declared
40 as PLFLT a[nx][ny].
41
42 nx (PLINT, input)
43 First dimension of array "a".
44
45 ny (PLINT, input)
46 Second dimension of array "a".
47
48 defined (PLINT (*) (PLFLT, PLFLT), input)
49 User function specifying regions excluded from the shading plot.
50 This function accepts x and y coordinates as input arguments and
51 must return 0 if the point is in the excluded region or 1 other‐
52 wise. This argument can be NULL if all the values are valid.
53
54 xmin (PLFLT, input)
55 Defines the "grid" coordinates. The data a[0][0] has a position
56 of (xmin,ymin), a[nx-1][0] has a position at (xmax,ymin) and so
57 on.
58
59 xmax (PLFLT, input)
60 Defines the "grid" coordinates. The data a[0][0] has a position
61 of (xmin,ymin), a[nx-1][0] has a position at (xmax,ymin) and so
62 on.
63
64 ymin (PLFLT, input)
65 Defines the "grid" coordinates. The data a[0][0] has a position
66 of (xmin,ymin), a[nx-1][0] has a position at (xmax,ymin) and so
67 on.
68
69 ymax (PLFLT, input)
70 Defines the "grid" coordinates. The data a[0][0] has a position
71 of (xmin,ymin), a[nx-1][0] has a position at (xmax,ymin) and so
72 on.
73
74 shade_min (PLFLT, input)
75 Defines the lower end of the interval to be shaded. If shade_max
76 <= shade_min, plshade1(3plplot) does nothing.
77
78 shade_max (PLFLT, input)
79 Defines the upper end of the interval to be shaded. If shade_max
80 <= shade_min, plshade1(3plplot) does nothing.
81
82 sh_cmap (PLINT, input)
83 Defines color map.
84
85 sh_color (PLFLT, input)
86 Defines color map index if cmap0 or color map input value (rang‐
87 ing from 0. to 1.) if cmap1.
88
89 sh_width (PLINT, input)
90 Defines width used by the fill pattern.
91
92 min_color (PLINT, input)
93 Defines pen color, width used by the boundary of shaded region.
94 The min values are used for the shade_min boundary, and the max
95 values are used on the shade_max boundary. Set color and width
96 to zero for no plotted boundaries.
97
98 min_width (PLINT, input)
99 Defines pen color, width used by the boundary of shaded region.
100 The min values are used for the shade_min boundary, and the max
101 values are used on the shade_max boundary. Set color and width
102 to zero for no plotted boundaries.
103
104 max_color (PLINT, input)
105 Defines pen color, width used by the boundary of shaded region.
106 The min values are used for the shade_min boundary, and the max
107 values are used on the shade_max boundary. Set color and width
108 to zero for no plotted boundaries.
109
110 max_width (PLINT, input)
111 Defines pen color, width used by the boundary of shaded region.
112 The min values are used for the shade_min boundary, and the max
113 values are used on the shade_max boundary. Set color and width
114 to zero for no plotted boundaries.
115
116 fill (void (*) (PLINT, PLFLT *, PLFLT *), input)
117 Routine used to fill the region. Use plfill(3plplot). Future
118 version of plplot may have other fill routines.
119
120 rectangular (PLBOOL, input)
121 Set rectangular to true if rectangles map to rectangles after
122 coordinate transformation with pltrl. Otherwise, set rectangu‐
123 lar to false. If rectangular is set to true, plshade tries to
124 save time by filling large rectangles. This optimization fails
125 if the coordinate transformation distorts the shape of rectan‐
126 gles. For example a plot in polar coordinates has to have rec‐
127 tangular set to false.
128
129 pltr (void (*) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer) , input)
130 Pointer to function that defines transformation between indices
131 in array z and the world coordinates (C only). Transformation
132 functions are provided in the PLplot library: pltr0(3plplot) for
133 identity mapping, and pltr1(3plplot) and pltr2(3plplot) for
134 arbitrary mappings respectively defined by one- and two-dimen‐
135 sional arrays. In addition, user-supplied routines for the
136 transformation can be used as well. Examples of all of these
137 approaches are given in the PLplot documentation. The transfor‐
138 mation function should have the form given by any of
139 pltr0(3plplot), pltr1(3plplot), or pltr2(3plplot).
140
141 pltr_data (PLPointer, input)
142 Extra parameter to help pass information to pltr0(3plplot),
143 pltr1(3plplot), pltr2(3plplot), or whatever routine that is
144 externally supplied.
145
146
148 Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This
149 man page was automatically generated from the DocBook source of the
150 PLplot documentation, maintained by Alan W. Irwin and Rafael
151 Laboissiere.
152
154 PLplot documentation at http://plplot.sourceforge.net/resources.
155
156
157
158 July, 2010 PLSHADE1(3plplot)