splot: Plot with styles

View source: R/splot.R

splotR Documentation

Plot with styles

Description

Plot using predefined parameter lists

Usage

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 simplists.

.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 simplists 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

boldly <- simplist(col = "red", lwd = 5)
timidly <- simplist(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")

plutils documentation built on Feb. 19, 2026, 3:01 a.m.