Learn R Programming

fields (version 5.02)

surface.Krig: Plots a surface and contours

Description

Creates different plots of the fitted surface of a Krig object. This is a quick way to look at the fitted function over reasonable default ranges.

Usage

## S3 method for class 'Krig':
surface(obj, grid.list = NA, extrap = FALSE, graphics.reset =
                 NULL, xlab = NULL, ylab = NULL, main = NULL, zlab =
                 NULL, zlim = NULL, levels = NULL, type = "C", nx =
                 80, ny = 80, ...)

## S3 method for class 'mKrig': surface(obj, grid.list = NA, extrap = FALSE, graphics.reset = NULL, xlab = NULL, ylab = NULL, main = NULL, zlab = NULL, zlim = NULL, levels = NULL, type = "C", nx=80, ny=80, ...)

Arguments

Details

This function is essentially a combination of predict.surface and plot.surface. It may not always give a great rendition but is easy to use for checking the fitted surface. The default of extrap=F is designed to discourage looking at the estimated surface outside the range of the observations.

NOTE: that any Z covariates will b edropped and only the spatial part of the model will be evaluated.

See Also

Krig predict.surface, plot.surface, image.plot

Examples

Run this code
fit<- Krig(ozone$x,ozone$y, theta=30)  # krig fit 

#Image plot of surface with nice, smooth  contours and shading

surface(fit, type="C", nx=128, ny=128)

Run the code above in your browser using DataLab