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

NAME

6       plgriddata - Grid data from irregularly sampled data
7

SYNOPSIS

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

DESCRIPTION

12       Real  world  data  is frequently irregularly sampled, but all PLplot 3D
13       plots require data placed in a uniform grid. This function takes irreg‐
14       ularly  sampled  data  from  three  input  arrays x[npts], y[npts], and
15       z[npts], reads the desired grid location from  input  arrays  xg[nptsx]
16       and   yg[nptsy],  and  returns  the  gridded  data  into  output  array
17       zg[nptsx][nptsy].  The algorithm used to grid  the  data  is  specified
18       with  the argument type which can have one parameter specified in argu‐
19       ment data.
20
21       Redacted form:  General: plgriddata(x, y, z, xg, yg,  zg,  type,  data)
22       Perl/PDL: Not available?
23
24
25       This function is used in example 21.
26

ARGUMENTS

28       x (PLFLT *, input)
29              The input x array.
30
31       y (PLFLT *, input)
32              The input y array.
33
34       z (PLFLT *, input)
35              The  input  z array. Each triple x[i], y[i], z[i] represents one
36              data sample coordinate.
37
38       npts (PLINT, input)
39              The number of data samples in the x, y and z arrays.
40
41       xg (PLFLT *, input)
42              The input array that specifies the grid spacing in the x  direc‐
43              tion.  Usually xg has nptsx equally spaced values from the mini‐
44              mum to the maximum values of the x input array.
45
46       nptsx (PLINT, input)
47              The number of points in the xg array.
48
49       yg (PLFLT *, input)
50              The input array that specifies the grid spacing in the y  direc‐
51              tion. Similar to the xg parameter.
52
53       nptsy (PLINT, input)
54              The number of points in the yg array.
55
56       zg (PLFLT **, output)
57              The  output array, where data lies in the regular grid specified
58              by xg and yg. the zg array must exist or  be  allocated  by  the
59              user    prior   to   the   call,   and   must   have   dimension
60              zg[nptsx][nptsy].
61
62       type (PLINT, input)
63              The type of gridding algorithm to use, which can  be:  GRID_CSA:
64              Bivariate  Cubic Spline approximation GRID_DTLI: Delaunay Trian‐
65              gulation Linear Interpolation GRID_NNI: Natural Neighbors Inter‐
66              polation GRID_NNIDW: Nearest Neighbors Inverse Distance Weighted
67              GRID_NNLI: Nearest Neighbors Linear  Interpolation  GRID_NNAIDW:
68              Nearest  Neighbors  Around Inverse Distance Weighted For details
69              of the algorithms read the source file plgridd.c.
70
71       data (PLFLT, 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
80              accepted. If 0, all weights will be accepted.
81
82
83

AUTHORS

85       Geoffrey Furnish and Maurice LeBrun wrote and  maintain  PLplot.   This
86       man  page  was  automatically  generated from the DocBook source of the
87       PLplot  documentation,  maintained  by  Alan  W.   Irwin   and   Rafael
88       Laboissiere.
89

SEE ALSO

91       PLplot documentation at http://plplot.sourceforge.net/resources.
92
93
94
95                                  July, 2010               PLGRIDDATA(3plplot)
Impressum