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
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 as
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
Ute Hahn, firstname.lastname@example.org
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 = simplist(col = "red", lwd = 2), b = simplist(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.