[Rd] Image display in R

Duncan Murdoch murdoch at stats.uwo.ca
Fri Nov 18 16:35:31 CET 2005


On 11/18/2005 10:22 AM, Vasundhara Akkineni wrote:
> Hi all,
>  I am trying to display a matrix of plots(images), for example a 3*3 matrix
> of 9 image plots, such that when a user clicks on a image i can show the
> enlarged plot. I tried the multiple graphic device(using mfcol=c(3,3) and
> mfg), but it creates multiple plots in a single image file. So, i won't be
> able to highlight a particular plot when the user clicks on it.
>  To be more clear, can i display images in the form of a matrix in R. Are
> there any grids available? Please let me know.

I don't see why you think par(mfcol=c(3,3)) isn't working.  If you want 
your plots all in one device, that's one way to do it.  (There are 
others, but I don't know what you dislike about this one, so I don't 
know which ones would be any better.)

About a month ago I posted code to use locator() to determine which cell 
someone clicked on.  You can see that code here: 
<http://tolstoy.newcastle.edu.au/~rking/R/help/05/10/14322.html>.

Duncan Murdoch



More information about the R-devel mailing list