I have created a SpatialPoints object, converted it to a ppp object, and
then run spatialstat's density function create a density object.  I can use
the png function to make a density plot.  I would like the density plot to
be transparent so that I can include it as a layer on a map.  Is there any
way to create a partially transparent density plot that will be suitable for
a  map overlay?

 

> class(ppp)                        # a ppp object created from a
SpatialPoints object

[1] "ppp"

 

> png("tmp.png", width=SGqk$width, height=SGqk$height, bg="transparent")

> d<-density(ppp,1),col=rainbow(4))

> plot(d)

> dev.off()

 

# problem is that tmp.png has a solid background color that obscures the map
when I try to use it as a map overlay

 


	[[alternative HTML version deleted]]

