[R] R plot to HTML image map

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Thu Apr 29 17:36:58 CEST 2004

Rudi Alberts wrote:
> Hi,
> I automatically create some R matplots and now I would like to 
> automatically create HMTL image maps and make the plots clickable.
> Do you have any suggestions how to do this?

What part of the plots do you want clickable? Lines are normally a bit 
thin for clickable imagemaps...

  I wrote a library to help me produce imagemaps from R code, its here:


  along with an example.

  I wrote the code a while ago, and I can't remember how it works, and 
you need the png() graphics device - which needs an X11 display, so its 
tricky to do this from a console or server application. You need to let 
it talk to an X virtual frame buffer in this case.

  The tricky bit, I recall vaguely, was mapping device coords to pixel 
coords on the PNG device.

  Good luck...


More information about the R-help mailing list