[R] window (x,y) co-ordinates of datapoints
Greg.Snow at intermountainmail.org
Tue Oct 9 22:59:40 CEST 2007
Look at the cnvrt.coords function in the TeachingDemos package, it does
this type of thing for you.
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at intermountainmail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Samuel Kemp
> Sent: Tuesday, October 09, 2007 4:59 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] window (x,y) co-ordinates of datapoints
> In the getGraphicsEvent function the (x,y) co-ordinates
> returned from the mouse move are in relation to where the
> mouse is located within the device window (i.e. the lower
> left corner of the window is '(0,0)', the upper right is
> '(1,1)'). Is there a way of returning the (x,y) co-ordinates
> of data points plotted where instead of x and y being the
> actual data points they are the coordinates of the device window.
> e.g. below is a simple plot of x,y data
> x <- 1:10
> y <- x*20
> > x
> > y
> what I actually want to know is where (x,y) is within
> the device window.
> Does any-one have any ideas?
> Thanks in advance,
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help