Remove grey area when using gplot (rasterVis)
Hello, Use na.value='transparent' inside scale_fill_gradient: theme_set(theme_bw()) gplot(s) + geom_tile(aes(fill = value)) + facet_wrap(~ variable) + scale_fill_gradient(low = "white", high = "blue", na.value='transparent') + coord_equal() Best, Oscar Manuel Sp?nola <mspinola10 at gmail.com> writes:
Dear list members,
How can I remove the grey area that appear when using gplot from rasterVis
Here is the reproducible example that come from the example of gplot:
r <- raster(system.file("external/test.grd", package="raster"))
s <- stack(r, r*2)
names(s) <- c("meuse", "meuse x 2")
theme_set(theme_bw())
gplot(s) + geom_tile(aes(fill = value)) +
facet_wrap(~ variable) +
scale_fill_gradient(low = "white", high = "blue") +
coord_equal()
Best,
Manuel
Oscar Perpi??n Lamigueiro Grupo de Sistemas Fotovoltaicos (IES-UPM) Dpto. Ingenier?a El?ctrica (EUITI-UPM) URL: http://procomun.wordpress.com Twitter: @oscarperpinan LinkedIn: http://www.linkedin.com/in/oscarperpinan