disp.grid: Wrapper function for akima interpolations

Description Usage Arguments Value See Also Examples

Description

This function takes standard long dataset expected by the package's image.plot based functions and returns the appropriate interpolated matrices for the xyz values. Mostly used internally in disp.plot and ggdisp.plot.

Usage

1
2
disp.grid(x, y, z, nx = length(unique(x)), ny = length(unique(y)),
  method = "bilinear")

Arguments

x

x vector

y

y vector

z

z vector

nx, ny

The square image will be constructed from nx by ny polygons. If nx and ny are equal to the defaults, length(unique(x)) and length(unique(y)), the plot produced will be a standard (uninterpolated) colorplot. Higher values of nx and ny will produce smoother plots.

method

Specifies the interpolation method to use. Default is 'bilinear' using akima::interp, you can also use 'bicubic' (from akima::bicubic.grid).

Value

returns a list x a nx by ny matrix of interpolated x values y a nx by ny matrix of interpolated y values z a nx by ny matrix of interpolated z values

See Also

interp, bicubic.grid

Examples

1
2
3
4
5
6
data(SPPdispersion)
a<-disp.grid( SPPdispersion$wavelength*1e9,
              SPPdispersion$angle,
              SPPdispersion$reflection)
image(a$x)
image(a$z)

tjconstant/disp.plot documentation built on May 31, 2019, 3:38 p.m.