plot.basisfd: Plot a Basis Object

Description Usage Arguments Value Side Effects See Also Examples

Description

Plots all the basis functions.

Usage

1
2
## S3 method for class 'basisfd'
plot(x, knots=TRUE, axes=NULL, ...)

Arguments

x

a basis object

knots

logical: If TRUE and x[['type']] == 'bslpine', the knot locations are plotted using vertical dotted, red lines. Ignored otherwise.

axes

Either a logical or a list or NULL.

  • logical whether axes should be drawn on the plot

  • list a list used to create custom axes used to create axes via do.call(x$axes[[1]], x$axes[-1]). The primary example of this uses list("axesIntervals", ...), e.g., with Fourier bases to create CanadianWeather plots

...

additional plotting parameters passed to matplot.

Value

none

Side Effects

a plot of the basis functions

See Also

plot.fd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
##
## 1.  b-spline
##
# set up the b-spline basis for the lip data, using 23 basis functions,
#   order 4 (cubic), and equally spaced knots.
#  There will be 23 - 4 = 19 interior knots at 0.05, ..., 0.95
lipbasis <- create.bspline.basis(c(0,1), 23)
# plot the basis functions
plot(lipbasis)

##
## 2.  Fourier basis
##
yearbasis3 <- create.fourier.basis(c(0,365),
                    axes=list("axesIntervals") )
#  plot the basis
plot(yearbasis3)

drtagkim/mcgillfdar documentation built on May 12, 2019, 6:20 p.m.