I have a point pattern (ppp) which I have done a kernel density estimation on. I have already changed the colour output using this:
require(RColorBrewer)
colfunc <- colorRampPalette(c("white", "black"))
Then created the kernel density map (smktppp and W were previously specified):
plot(density.ppp(smktppp, 0.5, edge=T), col=colfunc, main="Supermarket Density", window=W)
I would like to make the white parts (where the KDE/scale is at 0) transparent (with no fill). How would I go about doing this?
Thank you!