splot: Plot with styles

Description Usage Arguments Details Author(s) Examples

View source: R/splot.R

Description

Plot using predefined parameter lists

Usage

1
  splot(x, ..., NULL.rm = TRUE, .plotmethod = "plot")

Arguments

x

an object that belongs to a class with plot method.

...

plot parameters, may be wrapped in style lists.

NULL.rm

logical. If TRUE, ignore parameters with value NULL.

.plotmethod

character naming a function, defaults to "plot".

Details

The function calls the plot-method of x, with arguments given in .... Any styles contained in the arguments are unwrapped. If arguments with the same name appear in the list, the last one is taken.

! Note: Don't use this function inside a plot method, or any other method that might be called with splot !

Author(s)

Ute Hahn, ute@imf.au.dk

Examples

1
2
3
4
5
6
7
8
9
boldly <- style(col = "red", lwd = 5)
timidly <- style(col = "gray", lwd = 0.5, lty = "dashed")

splot(sin, boldly, to = pi, ylim = c(-1,1))
splot(cos, timidly, add = TRUE, to = pi)

# the last one wins:
splot(sin, boldly, timidly)
splot(sin, timidly, boldly, col = "green")

plottools documentation built on May 31, 2017, 1:35 a.m.

Search within the plottools package
Search all R packages, documentation and source code