Re: [R] rasterImage and coordinate conversion

2010-11-18 Thread Paul Murrell
Hi Rajarshi Guha wrote: Hi, I have a plot and I would like to overlay a PNG image over it. I'm using the rasterImage function to do this, but the problem I'm facing is working out the coordinates of the upper right corner of the final image in user coordinates. That is I can place the image so

Re: [R] rasterImage and coordinate conversion

2010-11-18 Thread baptiste auguie
Hi, For curiosity's sake, below is another version with ggplot2 and Grid graphics, library(pixmap) logo - read.pnm(system.file(pictures/logo.ppm, package=pixmap)[1]) library(ggExtra) # r-forge, requires gridExtra qplot(rnorm(100),rnorm(100)) + annotate(pixmap, x=-Inf, y=-Inf, picture=logo,

[R] rasterImage and coordinate conversion

2010-11-17 Thread Rajarshi Guha
Hi, I have a plot and I would like to overlay a PNG image over it. I'm using the rasterImage function to do this, but the problem I'm facing is working out the coordinates of the upper right corner of the final image in user coordinates. That is I can place the image so the lower left is located