[R] Plot .jpeg image in margins?

Greg Snow Greg.Snow at intermountainmail.org
Mon Jan 8 19:25:50 CET 2007


Here is one example of a way to do it:

library(rimage) # for the read.jpeg function
library(TeachingDemos) # for the subplot function

par(xpd=NA,mar=c(5,4,4,8)+0.1)

plot(1:10,10:1)

x <- read.jpeg(system.file("data", "cat.jpg", package="rimage"))

subplot( plot(x), 12, 5 )


Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Kari
> Sent: Sunday, January 07, 2007 10:10 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Plot .jpeg image in margins?
> 
> Is it possible to plot an image (currently a jpeg) in the margins?
> 
> 
> Thanks,
> Kari
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list