active pdf/annotated visualization RFC

Barry Rowlingson
Tue, 05 Nov 2002 13:47:50 +0000

Vincent J. Carey, Jr. wrote:
> The basic objective
> is to take a small number of locations on a graph and
> hyperlink them -- add persistent information to the pdf
> rendering of the graph so that when the user clicks
> on the location, a browser is (started if necessary and) pointed
> to a URL specified by the persistent information.

  I'd save the graphic as a PNG and then use Gimp's Imagemap function to 
  define hyperlink areas on the image. Then Gimp writes out a chunk of 
HTML that you include in a web page.

  Imagemaps are the standard way of making parts of an image clickable, 
and are supported by all graphical browsers, and do not require 
proprietary PDF format documents.

  Here's a sample that displays plot.png and defines a circle that when 
clicked on takes you to 'data.html':

<IMG SRC="plot.png" WIDTH=505 HEIGHT=664 BORDER=0 USEMAP="#map">
<MAP NAME="map">
<AREA SHAPE="CIRCLE" COORDS="67,358,8" HREF="data.html">

  How can we integrate this with R? I guess that HREF's could be added 
to plot commands:

link[1] <- "data1.html" ; link[2] <- "data2.html" ; etc etc

text(5,5,"Click here for info",href="click.html")

  and then there would be a function that saves a graphic image (PNG 
file) and an HTML MAP specification.

  Blue sky thinking today.


r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: