[R-sig-Geo] semi-transparent layer with image()

Edzer J. Pebesma edzer.pebesma at uni-muenster.de
Fri Nov 16 13:58:04 CET 2007


Although not specifically related to r-sig-geo, I'll comment a bit -

I wouldn't delete part of the cells, but rather define the transparency 
bit in the color. You can do that, e.g. by

 > rgb(1,0,0,0.5)
[1] "#FF000080"

you'll get half transparent red. Note that you need a device that 
supports this; I'm not sure about windows screen device; X11 doesn't but 
Cairo does; pdf does if you specify version=1.4 or so (read ?pdf).
--
Edzer

Ingo Holz wrote:
> Hi,
>
>  I have two objects of "class image" (a list of x, y, z coordinates, where z is a 
> matrix and x and y are row names / col names). 
>
>  I would like to overlay one of this images on top of the other. As a semi-
> transparent overlay. Is this possible using function image()?
>
>  I suppose I could set some of the z-values as NA (every second?). Could 
> this be a way to get a semi-transparent overlay?
>
>   I know I could do this with a GIS or something similar...
>
> Thank you for your help,
> Ingo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




More information about the R-sig-Geo mailing list