1PLGRADIENT(3plplot) PLplot API PLGRADIENT(3plplot)
2
3
4
6 plgradient - Draw linear gradient inside polygon
7
9 plgradient(n, x, y, angle)
10
12 Draw a linear gradient using colour map 1 inside the polygon defined by
13 the n points (x[i], y[i]). Interpretation of the polygon is the same
14 as for plfill(3plplot). The polygon coordinates and the gradient angle
15 are all expressed in world coordinates. The angle from the x axis for
16 both the rotated coordinate system and the gradient vector is specified
17 by angle. The magnitude of the gradient vector is the difference
18 between the maximum and minimum values of x for the vertices in the
19 rotated coordinate system. The origin of the gradient vector can be
20 interpreted as being anywhere on the line corresponding to the minimum
21 x value for the vertices in the rotated coordinate system. The dis‐
22 tance along the gradient vector is linearly transformed to the indepen‐
23 dent variable of colour map 1 which ranges from 0. at the tail of the
24 gradient vector to 1. at the head of the gradient vector. What is
25 drawn is the RGBA colour corresponding to the independent variable of
26 colour map 1. For more information about colour map 1 (see the PLplot
27 documentation).
28
29 Redacted form: plgradient(x,y,angle)
30
31 This function is used in examples 25,30.
32
34 n (PLINT, input)
35 Number of vertices in polygon.
36
37 x (PLFLT *, input)
38 Pointer to array with x coordinates of vertices.
39
40 y (PLFLT *, input)
41 Pointer to array with y coordinates of vertices.
42
43 angle (PLFLT, input)
44 Angle (degrees) of gradient vector from x axis.
45
46
48 Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This
49 man page was automatically generated from the DocBook source of the
50 PLplot documentation, maintained by Alan W. Irwin and Rafael
51 Laboissiere.
52
54 PLplot documentation at http://plplot.sourceforge.net/resources.
55
56
57
58 July, 2010 PLGRADIENT(3plplot)