layered(..., plotargs = NULL, LayerList=NULL)plot.name=value....."layered".
There are methods for plot, "[",
"shift", "affine", "rotate" and "rescale".plot. It will typically belong to
some class, which has a method for the generic function plot. The command layered simply saves the objects ...
as a list of class "layered". This list can then be plotted by
the method plot.layered. Thus, you only need to
type a single plot command to produce the multi-layered plot.
Individual layers of the plot can be switched on or off, or
manipulated, using arguments to plot.layered.
The argument plotargs contains default values of the
plotting arguments for each layer. It should be a list, with one
entry for each object in .... Each entry of plotargs
should be a list of arguments in the form name=value, which are
recognised by the plot method for the relevant layer.
The plotargs can also include an argument named .plot
specifying (the name of) a function to perform the plotting
instead of the generic plot.
The length of plotargs should either be equal to the
number of layers, or equal to 1. In the latter case it will be
replicated to the appropriate length.
plot.layered,
methods.layered,
as.layered,
[.layered,
layerplotargs.D <- distmap(cells)
L <- layered(D, cells)
L
L <- layered(D, cells,
plotargs=list(list(ribbon=FALSE), list(pch=16)))
plot(L)
layerplotargs(L)[[1]] <- list(.plot="contour")
plot(L)Run the code above in your browser using DataLab