Perfect, thankyou
On Fri, 2005-21-10 at 15:46 -0400, Duncan Murdoch wrote:
> On 10/21/2005 11:23 AM, tom wright wrote:
> > I'm trying to use the locator function on a drawing area with multiple
> > graphs par(mfrow=c(1,2))
> > Is it possible to identify which graph has been clicked?
>
> locator()
On 10/21/2005 11:23 AM, tom wright wrote:
> I'm trying to use the locator function on a drawing area with multiple
> graphs par(mfrow=c(1,2))
> Is it possible to identify which graph has been clicked?
locator() will return coordinates based on the active graph (typically
the last one you drew), s
I'm trying to use the locator function on a drawing area with multiple
graphs par(mfrow=c(1,2))
Is it possible to identify which graph has been clicked?
thanks
tom
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEA
On Sun, 5 Jun 2005, Sebastian Luque wrote:
Dear List members,
Thank you so much for your insights.
On Sat, 4 Jun 2005 09:39:33 +0100 (BST),
Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
[...]
I think it is more likely you want to wait for the Tk interaction and
then return the results, that
Dear List members,
Thank you so much for your insights.
On Sat, 4 Jun 2005 09:39:33 +0100 (BST),
Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
[...]
> I think it is more likely you want to wait for the Tk interaction and
> then return the results, that is use a `modal' widget. If so, take a
> l
To illustrate (?) Professor Ripley comments, I send you an example (stolen in
various places...).
Note the tkwm.resizable(tt, 0, 0) directive that prevents the window rescaling
(if not,the coordinates will not be correct).
#
# Getting the mouse coords with TclTk
#
# Two possibilities: tkrplot pa
You have two asynchronous processes here: your R function will return,
leaving a Tk widget up. Duncan Murdoch's solution is to give you a
function that will retrieve at some future stage the result of the last
press (if any) of "Get coordinates" button. Is that what you want?
I think it is m
Dear Sebastian:
Here is a snippet of code that you may find interesting
for labeling points on the plane:
plane1 <- function(x,main1="") {
plot(x,main=main1,ylab=" ")
zz <- locator()
text(zz$x,zz$y,
labels=paste("(",round(zz$x,1),
",",round(zz$y,1),")",sep=""),
pos=2
Sebastian Luque wrote:
Hello,
I'm trying to write a function using tcltk to interactively modify a plot
and gather locator() data. I've read Peter's articles in Rnews, the help
pages in tcltk, http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/,
plus a post in R-help sometime ago, but haven't
Hello,
I'm trying to write a function using tcltk to interactively modify a plot
and gather locator() data. I've read Peter's articles in Rnews, the help
pages in tcltk, http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/,
plus a post in R-help sometime ago, but haven't found a solution.
The ide
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 f
thanks to some great hints by Paul Murrel I could solve it: here we are
with one solution (code needs to be cleaned and simplified, but maybe
one can understand it)
###
## create a multifigure setting
nr <- 4
nc <- 2
opar <- par(mfrow = c(nr, nc))
slices <- 8
m <- matrix(runif(100),10,10)
my
I know, that I can use par(mfg = c(i,u)) to get the correct x,y
coordinates of one of the 8 matrices/subimages, but how can I get the i
and the j, means how can I know in which of the 8 images I am clicking in?
thanks
Christoph
Christoph Lehmann wrote:
Hi
based on some code from Thomas Petzoldt
Hi
based on some code from Thomas Petzoldt (see below), I have a question,
about how to use locator() in a mfrow() multi-figure setting. I am sure
this should be a kind of problem, which other people face too?
we have 8 matrices each 10x10 fields, plotted as mfrow = c(2,4).
how can I get, using
p <- locator(1)
c(round(p$x), round(p$y))
---
how can I get the "correct" location in the sense of a
3d info: (a) which slice (p$slice) (b) p$x (c) p$y
Okay, purely off the top of my head here...
You can use par()$usr, par()$plt, and par()$fig to transform from
locator()'s coordinates to device c
Hi
based on some code from Thomas Petzoldt, I have a question:
---
opar <- par(mfrow = c(2,4))
slices <- 8
m <- matrix(runif(100),10,10)
my.list <- list()
for (slice in 1:slices) {
my.list[[slice]] <- m
}
for (slice in 1:slices) {
x <- 1*(1:25)
y <- 1*(1:25)
z <- my.list[[slice]]
Peter,
On Fri, Feb 27, 2004 at 10:16:54AM +0100, Peter Wolf wrote:
> locator(n=1) returns the coordinates of the position of the mouse.
> But you have to click the left button of the mouse.
> How can I determine the mouse position without any click?
> Is it possible to extend locator in a way tha
Peter Wolf wrote:
locator(n=1) returns the coordinates of the position of the mouse.
But you have to click the left button of the mouse.
How can I determine the mouse position without any click?
Is it possible to extend locator in a way that locator(n=0) outputs the
coordinates at once, without a
There is nothing in the design of R base graphics to report the current
position of the mouse without clicking. Indeed, the graphics model does
not presume a mouse and pointer (and probably dates from the days of
cross-hairs manipulated with thumb wheels), and could conceivably use a
touchscre
locator(n=1) returns the coordinates of the position of the mouse.
But you have to click the left button of the mouse.
How can I determine the mouse position without any click?
Is it possible to extend locator in a way that
locator(n=0) outputs the coordinates at once, without any click event?
T
[EMAIL PROTECTED] wrote:
hello, how i cant with function locator() know the coordinates of two
function graphicated in the same graphical area, the return coordinates
which are they , of one function or the another function:
|f
| /(click here) locator(1), return (x,y) of f or g function?
hello, how i cant with function locator() know the coordinates of two
function graphicated in the same graphical area, the return coordinates
which are they , of one function or the another function:
|f
| /(click here) locator(1), return (x,y) of f or g function?
| /
| /
|/~g
|_
22 matches
Mail list logo