bicubic.grid.RdThis is a placeholder function for backward compatibility with packaga akima.
In its current state it simply calls the reimplemented Akima algorithm for irregular grids applied to the regular gridded data given.
Later a reimplementation of the original algorithm for regular grids may follow.
a vector containing the x coordinates of the rectangular data grid.
a vector containing the y coordinates of the rectangular data grid.
a matrix containing the z[i,j] data values for the grid points (x[i],y[j]).
vector of length 2 giving lower and upper limit for range x
coordinates used for output grid.
vector of length 2 giving lower and upper limit for range of y
coordinates used for output grid.
output grid dimension in x direction.
output grid dimension in y direction.
output grid spacing in x direction, not used by default,
overrides nx if specified.
output grid spacing in y direction, not used by default,
overrides ny if specified..
This function is a call wrapper for backward compatibility with package akima.
Currently it applies Akimas irregular grid splines to regular grids, later a FOSS reimplementation of his regular grid splines may replace this wrapper.
This function produces a grid of interpolated points, feasible to be
used directly with image and contour:
vector of x coordinates of the output grid.
vector of y coordinates of the output grid.
matrix of interpolated data for the output grid.
Akima, H. (1996) Rectangular-Grid-Data Surface Fitting that Has the Accuracy of a Bicubic Polynomial, J. ACM 22(3), 357-361
Use interp for the general case of irregular gridded data!
data(akima474)
# interpolate at a grid [0,8]x[0,10]
akima.bic <- bicubic.grid(akima474$x,akima474$y,akima474$z)
#> Warning: this output is generated according to Akimas irregular grid splines, not the regular grid one! This is a temporary workaround until Akimas ACM algorithm 760 is reimplmented from scratch!
zmin <- min(akima.bic$z, na.rm=TRUE)
zmax <- max(akima.bic$z, na.rm=TRUE)
breaks <- pretty(c(zmin,zmax),10)
colors <- heat.colors(length(breaks)-1)
image(akima.bic, breaks=breaks, col=colors)
contour(akima.bic, levels=breaks, add=TRUE)