Plot all objects given in a list, with parameters that can be given as a named list.
named list of
parameters and parameterlists passed to plot method of the objects.
logical, if TRUE, all objects are plotted in one window.
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
objects. Plot parameters not given in a list
apply to all objects. Plot parameters may also be grouped
style lists, since
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
Ute Hahn, [email protected]
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.