phaseplanePlot: Phase-plane plot

Description Usage Arguments Value See Also Examples

View source: R/phaseplanePlot.R

Description

Plot acceleration (or Ldfobj2) vs. velocity (or Lfdobj1) of a function data object.

Usage

1
2
3
4
5
6
phaseplanePlot(evalarg, fdobj, Lfdobj1=1, Lfdobj2=2,
        lty=c("longdash", "solid"),
      labels=list(evalarg=seq(evalarg[1], max(evalarg), length=13),
             labels=fda::monthLetters),
      abline=list(h=0, v=0, lty=2), xlab="Velocity",
      ylab="Acceleration", returnMatrix=FALSE, ...)

Arguments

evalarg

a vector of argument values at which the functional data object is to be evaluated.

Defaults to a sequence of 181 points in the range specified by fdobj[["basis"]][["rangeval"]].

If(length(evalarg) == 1)it is replaced by seq(evalarg[1], evalarg[1]+1, length=181).

If(length(evalarg) == 2)it is replaced by seq(evalarg[1], evalarg[2], length=181).

fdobj

a functional data object to be evaluated.

Lfdobj1

either a nonnegative integer or a linear differential operator object. The points plotted on the horizontal axis are eval.fd(evalarg, fdobj, Lfdobj1). By default, this is the velocity.

Lfdobj2

either a nonnegative integer or a linear differential operator object. The points plotted on the vertical axis are eval.fd(evalarg, fdobj, Lfdobj2). By default, this is the acceleration.

lty

line types for the first and second halves of the plot.

labels

a list of length two:

evalarg = a numeric vector of 'evalarg' values to be labeled.

labels = a character vector of labels, replicated to the same length as labels[["evalarg"]] in case it's not of the same length.

abline

arguments to a call to abline.

xlab

x axis label

ylab

y axis label

returnMatrix

logical: If TRUE, a two-dimensional is returned using a special class from the Matrix package.

...

optional arguments passed to plot.

Value

Invisibly returns a matrix with two columns containg the points plotted.

See Also

plot, eval.fd plot.fd nondurables index

Examples

1
2
3
4
5
6
7
8
9
goodsbasis <- create.bspline.basis(rangeval=c(1919,2000),
                                   nbasis=161, norder=8)
LfdobjNonDur <- int2Lfd(4)

library(zoo)
logNondurSm <- smooth.basisPar(argvals=index(nondurables),
                y=log10(coredata(nondurables)), fdobj=goodsbasis,
                Lfdobj=LfdobjNonDur, lambda=1e-11)
phaseplanePlot(1964, logNondurSm$fd)

fda documentation built on May 2, 2019, 5:12 p.m.