[R] locator and multiple plots

Stephane DRAY stephane.dray at umontreal.ca
Tue Nov 23 17:47:08 CET 2004


Hello,

I would like to know if it possible to use locator() only on one region of 
a graphic device.
I would like to fragment a graphic device into sub-regions (using layout or 
split.screen or any other functions that I do not know) and then use 
locator. but I want that the locator is only used for one of the sub-plot. 
In my view, I would like is that the cursor is an arrow on the graphical 
window and become an arrow only on the region that I specify. Is it 
possible ??
My problem is to do a kind of interactive plot. One region of the device is 
a plot, another part is a kind of buttons menu.
I create some kinds of buttons on the second region (use rect) and then 
wait that the user click with one of these buttons to upadte the plot on 
the first region.
It seems to me that when I use locator after split.screen, coordinates are 
returned for the last region invoked by screen(), is that ok ?


Another question, I want to open a new graphical device.
windows() do it for windows version. Is something like :
eval(parse(text=paste(options()$device,"(width=3,height=3)"))) will work 
for all platforms ?


Thanks in advance !
Stéphane DRAY
-------------------------------------------------------------------------------------------------- 

Département des Sciences Biologiques
Université de Montréal, C.P. 6128, succursale centre-ville
Montréal, Québec H3C 3J7, Canada

Tel : (514) 343-6111 poste 1233         Fax : (514) 343-2293
E-mail : stephane.dray at umontreal.ca
-------------------------------------------------------------------------------------------------- 

Web                                          http://www.steph280.freesurf.fr/




More information about the R-help mailing list