Description Usage Arguments Author(s) See Also Examples
Creating an image or contour plot of a three-dimensional array.
1 2 3 |
x |
object of class twApply2DMesh, a result of |
zlab |
label of the color key |
xlim |
|
ylim |
|
... |
further arguments passed to |
Thomas Wutzler
twPairs
, twMisc
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.