color.plot.loess: Contour plot of a regression surface

View source: R/colour.R

color.plot.loessR Documentation

Contour plot of a regression surface

Description

The regression surface is evaluated at all points on a grid, clipped values are set to NA, and contour.plot is used to plot the contours.

Usage

## S3 method for class 'loess'
color.plot(
  object,
  x,
  res = 50,
  fill = F,
  add = fill,
  clip = T,
  xlab = NULL,
  ylab = NULL,
  zlab = NULL,
  ...
)

Arguments

object

a loess object.

res

resolution of the sampling grid in each direction.

fill

passed to contour.plot.

add

If TRUE, the contours are added to an existing plot. Otherwise a new plot is created.

clip

a polygon over which the surface is to be defined. Possible values are FALSE (no clipping), TRUE (clip to the convex hull of the data), or a matrix with two columns specifying (x,y) coordinates.

...

extra arguments to color.plot.data.frame

data

data to use instead of model.frame(object).

Details

If add=FALSE, the data is plotted on top using color.plot.data.frame.

Value

A plot is produced.

Author(s)

Tom Minka

See Also

contour.plot

Examples


data(Housing)
fit = loess(Price ~ Rooms + Low.Status, Housing)
color.plot(fit)


paulemms/datamining documentation built on March 1, 2023, 4:01 p.m.