Skip to content
Prev 16062 / 29559 Next

background colour when add=T

Dear All,
 I am trying to plot some abundance density maps for different species
of birds which may be either marine or terrestrial. Having created the
density kernel (using kde from package ks), I plot() a background map
(actually a SpatialPolygonsDataFrame) and I can colour the land and
sea differently using col= and bg= options respectively, I can then
overlay my kernel using filled.contour. What I would now like to do is
mask the inappropriate part of the map. For marine birds this is easy,
simply replot the map using add=T and col= to 'blank' out the part of
the kernel over land. I thought the same would be true for landbirds,
simply use bg= to mask out the sea. Unfortunately when you have add=T
plot (not unreasonably, I suppose) doesn't seem to honour the bg=
argument, it just (I presume) sets it to 'transparent'. Does anyone
know if there is a way to subvert this? A posting from a couple of
years ago suggests probably not, but I wondered if anything had
changed in the interim?
many thanks in advance for any insights...
cheers
rob

**************  Find out about Britain's birds - www.bto.org/birdfacts
 **************

Dr Rob Robinson, Principal Ecologist
British Trust for Ornithology, The Nunnery, Thetford, Norfolk, IP24 2PU
Ph: +44 (0)1842 750050     E: rob.robinson at bto.org
Fx: +44 (0)1842 750030     W: www.bto.org/about-bto/our-staff/rob-robinson

====== "How can anyone be enlightened, when truth is so poorly lit" =======