[R] convert pixels into axis coordinates in R

Roger Bivand Roger.Bivand at nhh.no
Mon Mar 12 10:23:56 CET 2007


On Mon, 12 Mar 2007, Peter Stencel 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?

The posting guide suggests providing enough code for reproducing a problem 
- your question is not specific enough. If the jpeg is just an image, 
maybe something in the rimage package, or the Bioconductor EBImage 
package, or for geospatial, see the rgdal package. The pixmap package can 
do this too, but without more detail and code examples, it's difficult to 
tell.

> 
> 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?
> 

You are free to make a version for yourself, if that is what you really 
want.

> 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.
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-help mailing list