[R] adding bmp/jpg/gif to an existing plot
Greg Snow
Greg.Snow at imail.org
Thu Dec 3 18:15:15 CET 2009
Look at the subplot function in the TeachingDemos package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Cézar Freitas
> Sent: Thursday, December 03, 2009 7:24 AM
> To: r-help at r-project.org
> Subject: [R] adding bmp/jpg/gif to an existing plot
>
> Hi, all.
>
> I searched a lot at mailing list, installed EBImage and gtk packages,
> but I couldn't make this simple work:
>
> How
> to add a image file (jpg or bmp ou gif) to an existing plot window (not
> plot over the image), like the code below (pseudo function add.image):
>
>
>
>
> plot(1:10,1:10,main="test")
>
> image = read.X("myimage.jpg")
>
>
>
> add.image(image, x.left=2, y.bottom=4, size="40%") #points the left-
> bottom corner and the reative size of image
>
>
>
>
> abline(x=3, col=2, lwd=2) #continues editing the plot window.
>
> text(2,3,labels="example of graphics and image")
>
>
>
> Is it possible?
>
>
>
> Thanks,
>
> Cezar Freitas
>
>
>
> _______________________________________________________________________
> _____________
> Veja quais são os assuntos do momento no Yahoo! +Buscados
> http://br.maisbuscados.yahoo.com
> [[alternative HTML version deleted]]
More information about the R-help
mailing list