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

NAME

6       plshades - Shade regions on the basis of value
7

SYNOPSIS

9       plshades(a,  nx,  ny,  defined, xmin, xmax, ymin, ymax, clevel, nlevel,
10       fill_width, cont_color, cont_width, fill, rectangular, pltr, pltr_data)
11

DESCRIPTION

13       Shade regions on the basis of value.  This is  the  high-level  routine
14       for   making   continuous   color   shaded   plots   with  cmap1  while
15       plshade(3plplot) should be used to plot individual shaded regions using
16       either  cmap0  or  cmap1.  examples/;<language>/x16*  shows  how to use
17       plshades(3plplot) for each of our supported languages.
18
19       Redacted form: General: plshades(a, defined, xmin,  xmax,  ymin,  ymax,
20       clevel,  fill_width,  cont_color,  cont_width, fill, rectangular, pltr,
21       pltr_data)  Perl/PDL:  plshades(a,  xmin,  xmax,  ymin,  ymax,  clevel,
22       fill_width,  cont_color,  cont_width, fill, rectangular, defined, pltr,
23       pltr_data)
24
25
26       This function is used in examples 16, 21, and 22.
27

ARGUMENTS

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 matrix "a".
35
36       ny (PLINT(3plplot), input)
37              Second dimension of 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
44              entire  shade plot (the usual case), this argument should be set
45              to 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       clevel (PLFLT_VECTOR(3plplot), input)
53              A vector containing the data levels corresponding to  the  edges
54              of each shaded region that will be plotted by this function.  To
55              work properly the levels should be monotonic.
56
57       nlevel (PLINT(3plplot), input)
58              Number of shades plus 1 (i.e., the number of shade  edge  values
59              in clevel).
60
61       fill_width (PLFLT(3plplot), input)
62              Defines the line width used by the fill pattern.
63
64       cont_color (PLINT(3plplot), input)
65              Defines  cmap0  pen  color  used  for contours defining edges of
66              shaded regions.  The pen color is only  temporary  set  for  the
67              contour  drawing.   Set  this  value to zero or less if no shade
68              edge contours are wanted.
69
70       cont_width (PLFLT(3plplot), input)
71              Defines line width used for contours defining  edges  of  shaded
72              regions.   This value may not be honored by all drivers. The pen
73              width is only temporary set for the contour drawing.   Set  this
74              value to zero or less if no shade edge contours are wanted.
75
76       fill (PLFILL_callback(3plplot), input)
77              Callback  routine  used to fill the region.  Use plfill(3plplot)
78              for this purpose.
79
80       rectangular (PLBOOL(3plplot), input)
81              Set rectangular to true if rectangles map  to  rectangles  after
82              coordinate  transformation with pltrl.  Otherwise, set rectangu‐
83              lar to false. If rectangular is set to true,  plshade  tries  to
84              save  time by filling large rectangles.  This optimization fails
85              if the coordinate transformation distorts the shape  of  rectan‐
86              gles.   For example a plot in polar coordinates has to have rec‐
87              tangular set to false.
88
89       pltr (PLTRANSFORM_callback(3plplot), input)
90              A callback function that defines the transformation between  the
91              zero-based  indices  of  the  matrix a and world coordinates. If
92              pltr is not supplied (e.g., is set to NULL in the C case),  then
93              the x indices of a are mapped to the range xmin through xmax and
94              the y indices of a are mapped to the range ymin through ymax.For
95              the  C case, transformation functions are provided in the PLplot
96              library:  pltr0(3plplot)   for   the   identity   mapping,   and
97              pltr1(3plplot) and pltr2(3plplot) for arbitrary mappings respec‐
98              tively defined by vectors and matrices.  In addition, C callback
99              routines for the transformation can be supplied by the user such
100              as the mypltr function in  examples/c/x09c.c  which  provides  a
101              general  linear  transformation  between  index  coordinates and
102              world coordinates.For languages other than C you should  consult
103              the PLplot documentation for the details concerning how PLTRANS‐
104              FORM_callback(3plplot) arguments  are  interfaced.  However,  in
105              general,  a  particular pattern of callback-associated arguments
106              such as a tr vector with 6 elements; xg and yg  vectors;  or  xg
107              and  yg  matrices are respectively interfaced to a linear-trans‐
108              formation  routine  similar  to  the  above   mypltr   function;
109              pltr1(3plplot);  and  pltr2(3plplot).  Furthermore,  some of our
110              more sophisticated bindings (see, e.g.,  the  PLplot  documenta‐
111              tion)  support  native  language callbacks for handling index to
112              world-coordinate transformations.   Examples  of  these  various
113              approaches  are given in examples/<language>x09*, examples/<lan‐
114              guage>x16*,  examples/<language>x20*,   examples/<language>x21*,
115              and examples/<language>x22*, for all our supported languages.
116
117       pltr_data (PLPointer(3plplot), input)
118              Extra  parameter  to  help  pass  information to pltr0(3plplot),
119              pltr1(3plplot), pltr2(3plplot),  or  whatever  routine  that  is
120              externally supplied.
121
122

AUTHORS

124       Many    developers   (who   are   credited   at   http://plplot.source
125       forge.net/credits.php) have contributed to PLplot over  its  long  his‐
126       tory.
127

SEE ALSO

129       PLplot    documentation   at   http://plplot.sourceforge.net/documenta
130       tion.php.
131
132
133
134                                 August, 2017                PLSHADES(3plplot)
Impressum