Learn R Programming

mosaic (version 0.3-13)

panel.plotFun: Panel function for plotting functions

Description

Panel function for plotting functions

Usage

panel.plotFun(object, ..., npts = NULL, zlab = NULL,
    lwd = 1, col = "black", filled = TRUE, levels = NULL,
    nlevels = 10, surface = FALSE,
    colorscheme = topo.colors, type = "l",
    transparency = NULL)

Arguments

object
an object (e.g., a formula) describing a function
...
additional arguments passed on to other panel functions
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)
lwd
line width for line graphs and contours
col
color for line graphs and contours
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
colorscheme
a function (topo.colors by default) for choosing colors for fill
type
type of plot ("l" by default)
transparency
number from 0 (transparent) to 1 (opaque) for the fill colors

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 ) )

Run the code above in your browser using DataLab