.\" This page was automatically generated.  Do not edit!
.\" 
.TH PLGRIDDATA 3plplot  "February, 2014" "" "PLplot API"
.SH NAME
\fBplgriddata\fP - Grid data from irregularly sampled data 
.SH SYNOPSIS
\fBplgriddata\fP(\fIx\fP, \fIy\fP, \fIz\fP, \fInpts\fP, \fIxg\fP, \fInptsx\fP, \fIyg\fP, \fInptsy\fP, \fIzg\fP, \fItype\fP, \fIdata\fP)
.SH DESCRIPTION

.P
Real world data is frequently irregularly sampled, but all PLplot 3D plots require data placed in a uniform grid. This function takes irregularly sampled data from three input arrays x[npts], y[npts], and z[npts], reads the desired grid location from input arrays xg[nptsx] and yg[nptsy], and returns the gridded data into output array zg[nptsx][nptsy].  The algorithm used to grid the data is specified with the argument type which can have one parameter specified in argument data. 
.P
Redacted form:  General: \fBplgriddata(x, y, z, xg, yg, zg, type, data)\fP
Perl/PDL: Not available? 
Python: \fIzg\fP=\fBplgriddata(x, y, z, xg, yg, type, data)\fP

.P
This function is used in example 21. 
.SH ARGUMENTS
.TP
\fIx\fP (const PLFLT *, input) 
The input x array. 
.TP
\fIy\fP (const PLFLT *, input) 
The input y array. 
.TP
\fIz\fP (const PLFLT *, input) 
The input z array. Each triple x[i], y[i], z[i] represents one data sample coordinate. 
.TP
\fInpts\fP (PLINT, input) 
The number of data samples in the x, y and z arrays. 
.TP
\fIxg\fP (const PLFLT *, input) 
The input array that specifies the grid spacing in the x direction. Usually xg has nptsx equally spaced values from the minimum to the maximum values of the x input array. 
.TP
\fInptsx\fP (PLINT, input) 
The number of points in the xg array. 
.TP
\fIyg\fP (const PLFLT *, input) 
The input array that specifies the grid spacing in the y direction. Similar to the xg parameter. 
.TP
\fInptsy\fP (PLINT, input) 
The number of points in the yg array. 
.TP
\fIzg\fP (PLFLT **, output) 
The output array, where data lies in the regular grid specified by xg and yg. the zg array must exist or be allocated by the user prior to the call, and must have dimension zg[nptsx][nptsy]. 
.TP
\fItype\fP (PLINT, input) 
The type of gridding algorithm to use, which can be: GRID_CSA: Bivariate Cubic Spline approximation 
GRID_DTLI: Delaunay Triangulation Linear Interpolation 
GRID_NNI: Natural Neighbors Interpolation 
GRID_NNIDW: Nearest Neighbors Inverse Distance Weighted 
GRID_NNLI: Nearest Neighbors Linear Interpolation 
GRID_NNAIDW:  Nearest Neighbors Around Inverse Distance Weighted 
For details of the algorithms read the source file plgridd.c. 
.TP
\fIdata\fP (PLFLT, input) 
Some gridding algorithms require extra data, which can be specified through this argument. Currently, for algorithm: GRID_NNIDW, data specifies the number of neighbors to use, the lower the value, the noisier (more local) the approximation is. 
GRID_NNLI, data specifies what a thin triangle is, in the range [1. .. 2.]. High values enable the usage of very thin triangles for interpolation, possibly resulting in error in the approximation. 
GRID_NNI, only weights greater than data will be accepted. If 0, all weights will be accepted. 


.SH AUTHORS
Many developers (who are credited at http://plplot.sourceforge.net/credits.php)
have contributed to PLplot over its long history.
.SH SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/documentation.php.
