# NOT RUN {
# Correlation matrix
data(iris) # make sure its from 'datasets' package, not from 'locfit'
image(cor(as.matrix(iris[, names(iris) != "Species"])))
# Correlation matrix has diagonal from top left to bottom right
par(mar = c(1, 3, 1, 2))
image2(cor(as.matrix(iris[, names(iris) != "Species"])), col = "RdBu", axes = FALSE)
# }
# NOT RUN {
# Color histogram
nn <- 10
set.seed(nn)
AA <- matrix(sample(c(rnorm(nn^2, -1, 0.1), rexp(nn^2/2, 0.5))), ncol = nn)
image2(AA, col = "Spectral")
image2(y = 1:15 + 2, x = 1:10, AA, col = "Spectral", axes = TRUE)
image2(y = 1:15 + 2, x = 1:10, AA, col = "Spectral", density = TRUE, axes = TRUE)
image2(AA, col = "Spectral", density = TRUE, zlim = c(min(AA), 3))
# }
Run the code above in your browser using DataLab