Re: [R] Plotting using image files

From: Greg Snow <>
Date: Wed 24 Aug 2005 - 00:59:04 EST

>>> "Mike Saunders" <> 08/23/05 06:52AM

>> This is a strange request, but I want to build a scatterplot using different image files (jpegs, gif, etc.) as the plot symbols. >> I have thought about setting this up using a very large layout matrix, but I thought someone might have a better >> approach. Furthermore, is there any way to have R paste an image file into a specific coordinate within a scatterplot?

Here is an example using cnvrt.coords from the TeachingDemos package and the jpeg plotting functions from the rimage package:


x <- runif(10,3,6)
y <- runif(10,100,200)

plot(x,y, type='n')

cp <- par(no.readonly=TRUE)
tmp <- cnvrt.coords(x,y)

for (i in 1:10){
  par(plt=c(tmp$dev$x[i] + c(-0.03,0.03), tmp$dev$y[i] + c(-0.03,0.03)),



hope this helps,

Greg Snow, Ph.D.
Statistical Data Center, LDS Hospital
Intermountain Health Care
(801) 408-8111 mailing list PLEASE do read the posting guide! Received on Wed Aug 24 01:03:39 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:44:32 EST