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  in‐
14       dependent  of y coordinate and vice versa.  This function takes irregu‐
15       larly 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       Python: zg=plgriddata(x, y, z, xg, yg, type, data)
24
25
26       This function is used in example 21.
27

ARGUMENTS

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

AUTHORS

85       Many developers (who  are  credited  at  http://plplot.org/credits.php)
86       have contributed to PLplot over its long history.
87

SEE ALSO

89       PLplot documentation at http://plplot.org/documentation.php.
90
91
92
93                                 January, 2021             PLGRIDDATA(3plplot)
Impressum