Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


mosaic (version 0.13.0)

panel.plotFun: Panel function for plotting functions

Description

Panel function for plotting functions

Usage

panel.plotFun(object, ..., type = "l", npts = NULL, zlab = NULL,
  filled = TRUE, levels = NULL, nlevels = 10, surface = FALSE,
  col.regions = topo.colors, alpha = NULL, discontinuity = NULL,
  discontinuities = NULL)

Arguments

object
an object (e.g., a formula) describing a function
...
additional arguments, typically processed by lattice panel functions such as panel.xyplot or panel.levelplot. Frequen
type
type of plot ("l" by default)
npts
an integer giving the number of points (in each dimension) to sample the function
zlab
label for z axis (when in surface-plot mode)
filled
fill with color between the contours (TRUE by default)
levels
levels at which to draw contours
nlevels
number of contours to draw (if levels not specified)
surface
a logical indicating whether to draw a surface plot rather than a contour plot
col.regions
a vector of colors or a function (topo.colors by default) for generating such
alpha
number from 0 (transparent) to 1 (opaque) for the fill colors
discontinuity
a positive number determining how sensitive the plot is to potential discontinuity. Larger values result in less sensitivity. The default is 1. Use discontinuity = Inf to disable discontinuity detection. Discontinuity detection uses a cr
discontinuities
a vector of input values at which a function is discontinuous or NULL to use a heuristic to auto-detect.

See Also

plotFun

Examples

Run this code
x <- runif(30,0,2*pi) 
d <- data.frame( x = x,  y = sin(x) + rnorm(30,sd=.2) )
xyplot( y ~ x, data=d )
ladd(panel.plotFun( sin(x) ~ x, col='red' ) )
xyplot( y ~ x | rbinom(30,1,.5), data=d )
ladd(panel.plotFun( sin(x) ~ x, col='red', lty=2 ) )    # plots sin(x) in each panel

Run the code above in your browser using DataLab