plot.havok: Plotting functions for the havok package of class “havok"

View source: R/plot_havok.R

plot.havokR Documentation

Plotting functions for the havok package of class “havok"

Description

Generic plotting function for object of class ("havok")

Usage

## S3 method for class 'havok'
plot(x, what = "interactive", ...)

Arguments

x

A "havok" object.

what

See details.

...

Other calls to plot.

Details

Arguments for what parameter:

  • "Interactive" - An interactive plotting function.

  • "Reconstruction" - Scaled reconstruction of the major component of a time-series.

  • "Forcing" - Forcing vector derived from HAVOK.

  • "Both" - A combination of 'reconstruction' and 'forcing'.

  • "U-modes" - U modes of the reconstructed time series.

  • "Vembedded" - A 2D reconstruction of the attractor based on Eigen vectors.

  • "Nonlinear" - A 2D reconstruction of the attractor with nonlinear regions colored red.

  • "SSmod" - Ouput time series of a HAVOK state space model.

  • "SSembedded" - A 2D reconstruction of the attractor based a HAVOK state space model.

Examples


## Not run: 
#Generate Data
##Set Lorenz Parameters
parameters <- c(s = 10, r = 28, b = 8/3)
n <- 3
state <- c(X = -8, Y = 8, Z =27) ##Inital Values

#Intergrate
dt <- 0.001
tspan <- seq(dt, 200, dt)
N <- length(tspan)

Lorenz <- function(t, state, parameters) {
 with(as.list(c(state, parameters)), {
   dX <- s * (Y - X)
   dY <- X * (r - Z) - Y
   dZ <- X * Y - b * Z
   list(c(dX, dY, dZ))
 })
}

out <- ode(y = state, times = tspan, func = Lorenz, parms = parameters, rtol = 1e-12, atol = 1e-12)
xdat <- out[, "X"]
t <- out[, "time"]
hav <- havok(xdat = xdat, dt = dt, stackmax = 100, lambda = 0,
            rmax = 15, polyOrder = 1, useSine = FALSE)

plot(hav)

## End(Not run)

RobertGM111/havok documentation built on July 8, 2023, 8:23 p.m.