PLGRIDDATA(3plplot)
π PLGRIDDATA π
okay so this is a page from the PLplot API β yes, PLGRIDDATA(3plplot), the grid-data-from-messy-scattered-points queen herself π β and honestly she's kind of a big deal.
β¨ NAME β¨
plgriddata β grid data from irregularly sampled data. literally takes your chaotic lil data points and gives them structure. main character energy fr. π¦
β¨ SYNOPSIS β¨
plgriddata(x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data)
like, that's the whole vibe. count the args, bestie, there's a lot of them π
β¨ DESCRIPTION β¨
okay so real talk: real-world data is frequently irregularly sampled π like it just shows up whenever it feels like it. but PLplot's 3D plots are kinda picky β they need data organized as a grid, i.e. where the x sample point values are independent of the y coordinate and vice versa. no cap.
so this function is the glow-up transformer π it takes irregularly sampled data from the x[npts], y[npts], and z[npts] vectors, reads the desired grid location from the input vectors xg[nptsx] and yg[nptsy], and returns the interpolated result on that grid using the output matrix zg[nptsx][nptsy]. slay.
the algorithm used to interpolate the data to the grid is specified with the argument type, which can have one parameter specified in argument data. that's it, that's the whole system π
Redacted form: General: plgriddata(x, y, z, xg, yg, zg, type, data) Python: zg=plgriddata(x, y, z, xg, yg, type, data)
this function is used in example 21 (go look, iykyk π).
β¨ ARGUMENTS β¨
so many args bestie, but we're getting through all of them together π«Ά
x(PLFLT_VECTOR(3plplot), input) β the input x vector. just vibes, just numbers.y(PLFLT_VECTOR(3plplot), input) β the input y vector.z(PLFLT_VECTOR(3plplot), input) β the input z vector. each triplex[i],y[i],z[i]represents one data sample coordinate. iconic trio behavior πnpts(PLINT(3plplot), input) β the number of data samples in thex,yandzvectors.xg(PLFLT_VECTOR(3plplot), input) β a vector that specifies the grid spacing in the x direction. usuallyxghasnptsxequally spaced values from the minimum to the maximum values of the x input vector πΈnptsx(PLINT(3plplot), input) β the number of points in thexgvector.yg(PLFLT_VECTOR(3plplot), input) β a vector that specifies the grid spacing in the y direction. similar to thexgparameter (twins! π―).nptsy(PLINT(3plplot), input) β the number of points in theygvector.zg(PLFLT_NC_MATRIX(3plplot), output) β the matrix of interpolated results where data lies in the grid specified byxgandyg. therefore thezgmatrix must be dimensionednptsxbynptsy. β οΈ yes that's a real constraint, don't come for me.type(PLINT(3plplot), input) β the type of grid interpolation algorithm to use, which can be:GRID_CSA: Bivariate Cubic Spline approximationGRID_DTLI: Delaunay Triangulation Linear InterpolationGRID_NNI: Natural Neighbors InterpolationGRID_NNIDW: Nearest Neighbors Inverse Distance WeightedGRID_NNLI: Nearest Neighbors Linear InterpolationGRID_NNAIDW: Nearest Neighbors Around Inverse Distance Weighted
for details of the algorithms read the source file plgridd.c π (yes, actually read it, it's right there).
data(PLFLT(3plplot), input) β some gridding algorithms require extra data, which can be specified through this argument. currently, for algorithm:GRID_NNIDW,dataspecifies the number of neighbors to use, the lower the value, the noisier (more local) the approximation is. π¬ lower = spicier, basically.GRID_NNLI,dataspecifies 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. π so like, be careful with the high values babe.GRID_NNI, only weights greater thandatawill be accepted. if0, all weights will be accepted.
β¨ AUTHORS β¨
many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. shoutout to the whole squad, absolute legends the lot of them ππ
β¨ SEE ALSO β¨
PLplot documentation at http://plplot.sourceforge.net/documentation.php. go read it, it's giving essential π₯
okay that's the whole page bestie!! this was PLGRIDDATA(3plplot), from the PLplot API, dated August, 2026 β and that's the version/source info right there, consider it officially signed off πβ¨π now go grid some data, you absolute icon π§ββοΈ
π¦ where this page comes from
- ubuntu stonking: plplot-doc 5.15.0+dfsg3-4 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms