Hi:
I don't have any direct experience with this sort of thing, but you
should be able to use something like annotation_raster() or
annotation_custom() [both new in ggplot2-0.9.0] as an initial
background layer if your watermark is a graphic. However, neither
function seems to have the option to set alpha transparency for the
input graphic, so you'd need to do that in advance. Whether this is
'better' than your approach is for you to decide - if your actual
watermark is a text string, then I see no reason to deviate from your
current method.
If you have a solid graphical object that you want for a background,
one way to fake transparency, I guess, would be to use one of the
above as the first layer in the ggplot2 graph, and then overlay it
with a geom_rect() at full size in a solid color with alpha
transparency before adding anything else. You could write a function
to do that.
A couple of examples of the use of the aforementioned annotation
functions are in the ggplot2-0.9.0 transition guide, section 4:
http://cloud.github.com/downloads/hadley/ggplot2/guide-col.pdf
HTH,
Dennis
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2