[R] How to get pixel position of a plot

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Fri Jun 27 11:36:56 CEST 2003


Philippe Hupé wrote:

> I would like to plot a graph on the jpeg device for example and to write 
> a table associated to this plot where I have the pixel coordonates of 
> each plotted point so that I could include the jpeg image onto a html 
> page and get all the information about each point when the mouse button 
> is pressed. The indentify() can do it but on the window device...

  You may wish to try my 'imagemap' library:

http://www.maths.lancs.ac.uk/Software/Imagemap/

  For background, read up about client-side imagemaps in HTML on a 
web-design web site. My library creates these things from an R plot.

Barry Rowlingson
Maths and Stats
Lancaster University
Lancaster, UK




More information about the R-help mailing list