In the geom_tile()
layer in the ggplot2 data visualization package for R, when a cell contains no data it is not drawn. E.g. http://docs.ggplot2.org/current/geom_tile.html and search for "missing value".
I would like to change this behavior to show the minimum value over all the tiles. Is this possible and if so how?
Additional context: when I use
stat_density2d(aes(x=x,y=y, fill=..density..), geom="tile", contour=FALSE)
I would like the regions with no density to look very similar to the regions with very little density. As it is now, if say the color spectrum is from blue to red and the background is white, then there when there is no data in a tile it is white and when there is a single data point in a tile is blue.
Adding a pseudo count to the data seems possible, but how do I know in advance how to distribute the pseudo-counts? and in the case when there are faceting?
See Question&Answers more detail:os