plot.funsample: Plot a funsample object

Description Usage Arguments Details See Also Examples

View source: R/plotfunsample.R

Description

Plots the individual functions contained in an object of class funsample in one plot.

Usage

1
2
## S3 method for class 'funsample'
plot(x, ..., includy = NULL)

Arguments

x

the funsample to be plotted

...

further arguments for controlling the plot.

includy

optional numeric vector containing values that are to be included in the ylim extent of the y-axis. Can be used to always start at 0, for example.

Details

This method requires that the functions in codex are univariate, which however is not checked.

Brightness / opacity of the curves can be controlled by setting alpha to a number between 0 and 1, see the description of function alphacol in package plottools.

The plot method plot.fdsample works like the function splot from package plottools. In particular, plot parameters can be given as "simplist"s or separately.

See Also

alphacol on defining transparent colors, and splot for the evaluation of plot parameters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
myfuns <- funsample(list(sin = sin, cos = cos), arglim = c(0, 2*pi))
plot(myfuns)
# using a predefined list of options, from plutils package
require(plutils)
blau <- simplist(col = "blue", alpha = 0.4)
plot(myfuns, blau, includy = -2)
# plot options can also be included when a funsample is generated:
trigostyle <- list(sin = simplist(col = "red", lty = "dashed"),
                  cos = simplist(col = "green"))
myfuns <- funsample(list(sin = sin, cos = cos), arglim = c(0, 2*pi), trigostyle)
plot(myfuns)

fdnonpar documentation built on May 2, 2019, 5:54 p.m.