Learn R Programming

Sim.DiffProc (version 2.8)

plot2d: Plotting for Class SDE

Description

Generic function for plotting.

Usage

## S3 method for class 'default':
plot2d(x, \dots)
## S3 method for class 'default':
lines2d(x, \dots)
## S3 method for class 'default':
points2d(x, \dots)
## S3 method for class 'default':
plot3D(x, display = c("persp","rgl"), ...)

Arguments

x
an object inheriting from class snssde2d, snssde3d, bridgesde2d and
display
"persp" perspective or "rgl" plots.
...
other graphics parameters, see par in package graphics.

newcommand

\CRANpkg

href

http://CRAN.R-project.org/package=#1

pkg

#1

Details

The 2 and 3-dim plot of class sde.

Examples

Run this code
## Example 1: 

fx <- expression(0)
gx <- expression(1)
fy <- expression(0)
gy <- expression(1)

res <- snssde2d(driftx=fx,diffx=gx,drifty=fy,diffy=gy,N=10000)
plot2d(res,type="l")

## Example 2: 

fx <- expression(0)
gx <- expression(1)
fy <- expression(0)
gy <- expression(1)
fz <- expression(0)
gz <- expression(1)

res <- snssde3d(driftx=fx,diffx=gx,drifty=fy,diffy=gy,driftz=fz,diffz=gz,N=10000)
plot3D(res,display="persp")
plot3D(res,display="rgl")

Run the code above in your browser using DataLab