Description Usage Arguments Details Author(s) Examples
Plot all objects given in a list, with parameters that can be given as a named list.
1 2 |
objects |
named list of |
... |
parameters and parameterlists passed to plot method of the objects. |
allinone |
logical, if TRUE, all objects are plotted in one window. |
.plotmethod |
a generic function for plotting, or a
character string naming a generic function. Defaults to
|
Only objects that belong to classes with a plot method
are plotted. The plot parameters may be given as lists
with the same name as the objects list. Parameters in
named lists are assigned to the object with same name in
list objects
. Plot parameters not given in a list
apply to all objects. Plot parameters may also be grouped
as style
lists, since lplot
internally calles splot
.
Any add
-parameters only affect the first plotted
object. Whether or not the plots of the remaining objects
are added to the first plot, is controlled by parameter
allinone.
Ute Hahn, ute@imf.au.dk
1 2 3 4 5 6 7 8 9 10 11 | # a list of plottable objects: functions
curves <- list(b = cos, a = sin)
lplot(curves, col = list(a = "green", b = "red"), ylim = c(-1, 1), to = pi)
# start a new plot for every object
lplot(curves, allinone = FALSE, col = list(a = "green", b = "red"),
ylim = c(-1, 1), to = pi)
# using plot styles
curves <- list(b = cos, a = sin)
mystyles <- list(a = style(col = "red", lwd = 2), b = style(col = "green"))
lplot(curves, mystyles, ylim = c(-1, 1), to = 2*pi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.