Re: [R] watermarks

About this list Date view Thread view Subject view Author view Attachment view

From: kjetil@acelerate.com
Date: Fri 14 May 2004 - 22:32:01 EST


Message-id: <40A48401.23981.3F85D83@localhost>

On 14 May 2004 at 11:45, Karla Meurk wrote:

> Hi, I would like to plot a graph which sits in the background as a
> watermark with other plots in the foreground - on top. I have looked
> through the threads on the r-project website but they seem to concern
> background colours rather than actual background plots. I have also
> searched through the demo's and pars but can't find any eg's
>
> any ideas - I only want to plot a simple graph using pie.chart()
>

You can do this with the pixmap package.
library(pixmap) and so
?pixmap
An example based on ?pixmap:

> ## Another example that math can be beautiful
> x <- seq(-3,3,length=100)
> z1 <- outer(x,x,function(x,y) abs(sin(x)*sin(y)))
> z2 <- outer(x,x,function(x,y) abs(sin(2*x)*sin(y)))
> z3 <- outer(x,x,function(x,y) abs(sin(x)*sin(2*y)))
>
> ## Notice that we specify a bounding box to get the correct
> ## coordinates on the axes. z1, z2 and z3 are used as red,
> ## green and blue channel, respectively.
> z <- pixmapRGB(c(z1,z2,z3), 100, 100, bbox=c(-1,-1,1,1))
> plot(z, axes=TRUE)
> par(new=TRUE)
> plot( (-20:20)/20, (-20:20)/20, xaxt="n", yaxt="n", ann=FALSE)
>

Kjetil Halvorsen

> Thanks
>
> Carla
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:10 EST