[R] image.plot transparent?
Chris82
rubenbauar at gmx.de
Fri Jul 13 15:07:10 CEST 2012
Hello,
hiere is a small reproducible example.
All z.i which are NA should be transparent at the plot, but they are white
colored.
### Example image.plot regular x,y grid ###
x <- seq(2,2.9,0.1)
y <- seq(42,42.9,0.1)
z <- matrix(seq(-5,4.9,0.1),nrow=10)
image.plot(x,y,z)
### overplotting by a irregular grid ####
x.i <-
matrix(c(2.434842,2.436714,2.438593,2.440477,2.442368,2.472929,2.474831,2.476739,2.478654,2.480574,2.511019,2.512950,2.514888,2.516832,2.518782,2.549111,2.551072,2.553039,2.555012,2.556992,2.587205,2.589195,2.591192,2.593195,2.595204),nrow=5,byrow=T)
y.i <-
matrix(c(42.24368,42.28684,42.33005,42.37330,42.41660,42.24392,42.28708,42.33028,42.37354,42.41683,42.24415,42.28732,42.33052,42.37378,42.41707,42.24439,42.28756,42.33076,42.37402,42.41732,42.24464,42.28780,42.33101,42.37426,42.41756),nrow=5,byrow=T)
z.i <- matrix(seq(-10,14,1),nrow=5)
z.i[z.i< 0] <- NA
image.plot(x.i,y.i,z.i, col=terrain.colors(20),add=T)
--
View this message in context: http://r.789695.n4.nabble.com/image-plot-transparent-tp4635976p4636434.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list