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

NAME

6       plgriddata - Grid data from irregularly sampled data
7

SYNOPSIS

9       plgriddata(x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data)
10

DESCRIPTION

12       Real  world data is frequently irregularly sampled, but PLplot 3D plots
13       require data organized as a grid, i.e.,  with  x  sample  point  values
14       independent of y coordinate and vice versa.  This function takes irreg‐
15       ularly sampled data from the x[npts],  y[npts],  and  z[npts]  vectors;
16       reads  the  desired  grid location from the input vectors xg[nptsx] and
17       yg[nptsy]; and returns the interpolated result on that grid  using  the
18       output  matrix zg[nptsx][nptsy].  The algorithm used to interpolate the
19       data to the grid is specified with the argument type which can have one
20       parameter specified in argument data.
21
22       Redacted  form:  General:  plgriddata(x,  y, z, xg, yg, zg, type, data)
23       Perl/PDL: Not available?  Python: zg=plgriddata(x, y, z, xg, yg,  type,
24       data)
25
26
27       This function is used in example 21.
28

ARGUMENTS

30       x (PLFLT_VECTOR(3plplot), input)
31              The input x vector.
32
33       y (PLFLT_VECTOR(3plplot), input)
34              The input y vector.
35
36       z (PLFLT_VECTOR(3plplot), input)
37              The  input z vector. Each triple x[i], y[i], z[i] represents one
38              data sample coordinate.
39
40       npts (PLINT(3plplot), input)
41              The number of data samples in the x, y and z vectors.
42
43       xg (PLFLT_VECTOR(3plplot), input)
44              A vector that specifies the grid spacing  in  the  x  direction.
45              Usually  xg  has nptsx equally spaced values from the minimum to
46              the maximum values of the x input vector.
47
48       nptsx (PLINT(3plplot), input)
49              The number of points in the xg vector.
50
51       yg (PLFLT_VECTOR(3plplot), input)
52              A vector that specifies the grid spacing  in  the  y  direction.
53              Similar to the xg parameter.
54
55       nptsy (PLINT(3plplot), input)
56              The number of points in the yg vector.
57
58       zg (PLFLT_NC_MATRIX(3plplot), output)
59              The  matrix  of interpolated results where data lies in the grid
60              specified by xg and yg. Therefore the zg matrix must  be  dimen‐
61              sioned nptsx by nptsy.
62
63       type (PLINT(3plplot), input)
64              The  type  of grid interpolation algorithm to use, which can be:
65              GRID_CSA: Bivariate Cubic Spline approximation GRID_DTLI: Delau‐
66              nay  Triangulation Linear Interpolation GRID_NNI: Natural Neigh‐
67              bors Interpolation GRID_NNIDW: Nearest  Neighbors  Inverse  Dis‐
68              tance Weighted GRID_NNLI: Nearest Neighbors Linear Interpolation
69              GRID_NNAIDW:  Nearest Neighbors Around Inverse Distance Weighted
70              For details of the algorithms read the source file plgridd.c.
71
72       data (PLFLT(3plplot), input)
73              Some gridding algorithms require extra data, which can be speci‐
74              fied  through   this   argument.   Currently,   for   algorithm:
75              GRID_NNIDW,  data  specifies the number of neighbors to use, the
76              lower the value, the noisier (more local) the approximation  is.
77              GRID_NNLI,  data specifies what a thin triangle is, in the range
78              [1. .. 2.]. High values enable the usage of very thin  triangles
79              for interpolation, possibly resulting in error in the approxima‐
80              tion.   GRID_NNI,  only  weights  greater  than  data  will   be
81              accepted. If 0, all weights will be accepted.
82
83
84

AUTHORS

86       Many    developers   (who   are   credited   at   http://plplot.source
87       forge.net/credits.php) have contributed to PLplot over  its  long  his‐
88       tory.
89

SEE ALSO

91       PLplot    documentation   at   http://plplot.sourceforge.net/documenta
92       tion.php.
93
94
95
96                                 August, 2017              PLGRIDDATA(3plplot)
Impressum