Hi there,
I'd like to create a heatmap from my matrix with
a) a defined color range (lets say from yellow to red)
b) using striking colors above and below a certain threshold (above = "green",
below = "blue")
Example matrix (there should be a few outliers generated...) + simple levelplot
without outliers marked:
library(lattice)
my.mat <- matrix(rnorm(800), nrow = 40)
threshold <- c(-1,1) # should be used for the extreme colors
colorFun <- colorRampPalette(c("yellow","red"))
levelplot(my.mat, col.regions = colorFun(50))
I don't know how to handle the extrem values...
Can anybody help?
Antje
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.