interpolate ( akima | linear | loglinear | polynomial | spline | stepwise | 2d [ ( bmp_r | bmp_g | bmp_b ) ] ) [ <range specification> ] <function name>() <filename> [ every { <expression> } ] [ index <value> ] [ select <expression> ] [ using { <expression> } ]
The interpolate command can be used to generate a special function within Pyxplot’s mathematical environment which interpolates a set of data points supplied from a data file. Either one- or two-dimensional interpolation is possible.
In the case of one-dimensional interpolation, various different types of interpolation are supported: linear interpolation, power law interpolation, polynomial interpolation, cubic spline interpolation and akima spline interpolation. Stepwise interpolation returns the value of the datapoint nearest to the requested point in argument space. The use of polynomial interpolation with large datasets is strongly discouraged, as polynomial fits tend to show severe oscillations between data points. Except in the case of stepwise interpolation, extrapolation is not permitted; if an attempt is made to evaluate an interpolated function beyond the limits of the data points which it interpolates, Pyxplot returns an error or value of not-a-number.
In the case of two-dimensional interpolation, the type of interpolation to be used is set using the interpolate modifier to the set samples command, and may be changed at any time after the interpolation function has been created. The options available are nearest neighbor interpolation – which is the two-dimensional equivalent of stepwise interpolation, inverse square interpolation – which returns a weighted average of the supplied data points, using the inverse squares of their distances from the requested point in argument space as weights, and Monaghan Lattanzio interpolation, which uses the weighting function (Monaghan & Lattanzio 1985)
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
where v=r/h
h=A/n
A
(x_max-x_min)(y_max-y_min)
n
01