Plotting multivariate functional data
This function plots observations of multivariate functional data on their domain. The graphic
device is split in a number of subplots (specified by dim
) via mfrow
(par
) and the univariate elements are plotted using plot
.
plot.multiFunData( x, y, obs = seq_len(nObs(x)), dim = seq_len(length(x)), par.plot = NULL, main = names(x), xlab = "argvals", ylab = "", log = "", ylim = NULL, ... ) ## S4 method for signature 'multiFunData,missing' plot(x, y, ...)
x |
An object of class |
y |
Missing. |
obs |
A vector of numerics giving the observations to plot. Defaults to
all observations in |
dim |
The dimensions to plot. Defaults to |
par.plot |
Graphic parameters to be passed to the plotting regions. The
option |
main |
A string vector, giving the title of the plot. Can have the same
length as |
xlab, ylab |
The titles for x- and y-axis. Defaults to |
log |
A character string, specifying the axis that is to be logarithmic.
Can be |
ylim |
Specifies the limits of the y-Axis. Can be either |
... |
Additional arguments to |
The function is currently implemented only for functional data with one- and two-dimensional domains.
oldpar <- par(no.readonly = TRUE) argvals <- seq(0, 2*pi, 0.1) # One-dimensional elements f1 <- funData(argvals, outer(seq(0.75, 1.25, length.out = 11), sin(argvals))) f2 <- funData(argvals, outer(seq(0.75, 1.25, length.out = 11), cos(argvals))) m1 <- multiFunData(f1, f2) plot(m1, main = c("1st element", "2nd element")) # different titles plot(m1, main = "Multivariate Functional Data") # one title for all # Mixed-dimensional elements X <- array(0, dim = c(11, length(argvals), length(argvals))) X[1,,] <- outer(argvals, argvals, function(x,y){sin((x-pi)^2 + (y-pi)^2)}) g <- funData(list(argvals, argvals), X) m2 <- multiFunData(f1, g) # different titles and labels plot(m2, main = c("1st element", "2nd element"), obs = 1, xlab = c("xlab1", "xlab2"), ylab = "one ylab for all") # one title for all plot(m2, main = "Multivariate Functional Data", obs = 1) ## Not run: plot(m2, main = c("1st element", "2nd element")) # must specify obs! par(oldpar)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.