[R] convert pixels into axis coordinates in R
Stephen Tucker
brown_emu at yahoo.com
Mon Mar 12 17:53:30 CET 2007
I'm not sure I understand your question, but can you just use par("usr") to
get the x,y-limits of your image plot and dim() on your matrix for the number
of pixels? Then all the points on the image (in your user coordinates) should
be known.
I don't know if this would help but I think you can convert jpeg images to
bitmaps for R to read using ImageMagick.
--- Peter Stencel <peter.stencel at uni-bielefeld.de> wrote:
> Dear R users,
>
> I've two questions:
>
> 1) Does anybody have a clue how to convert pixel from a jpeg graphic (e.g.
> something like a square of 100x100 pxs) into axis coordinate values in R?
>
> 2) Is there any possibility to extend the R locator function in a way that
> locator( ) outputs all coordinates from a plot at once, without clicking on
> the graph?
>
> Thanks for any hint.
>
> Regards,
> P. Stencel
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
____________________________________________________________________________________
Get your own web address.
More information about the R-help
mailing list