plot.twApply2DMesh: plot twApply2DMesh

Description Usage Arguments Author(s) See Also Examples

Description

Creating an image or contour plot of a three-dimensional array.

Usage

1
2
3
## S3 method for class 'twApply2DMesh'
plot(x, zlab = NULL, xlim = NULL, ylim = NULL, 
    ...)

Arguments

x

object of class twApply2DMesh, a result of twApply2DMesh

zlab

label of the color key

xlim
ylim
...

further arguments passed to twPlot2D

Author(s)

Thomas Wutzler

See Also

twPairs, twMisc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Example: Nested contours of mixture of three bi-variate normal densities
nmix3 <- function(x, y, m, s) {
    0.4 * dnorm(x, m, s) * dnorm(y, m, s)  +
        0.3 * dnorm(x, -m, s) * dnorm(y, -m, s)  +
        0.3 * dnorm(x, m, s) * dnorm(y, -1.5 * m, s) 
}
f <- function(x,y) nmix3(x,y,.5,.5)

n <- 50
x <- rnorm(n,.5,.7)
yy <- rnorm(n,.5,.8)
#mtrace(twApply2DMesh)
#mtrace(twPlot2DFun)
plot( tmp <- twApply2DMesh(x,yy,f,dims=30,label="density"))
plot( tmp, contour=TRUE)

twMisc documentation built on May 2, 2019, 6:11 p.m.