How can R users take advantage of the "active PDF" paradigm for annotation of statistical graphics? 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. One possibility is to generate pdf graphical documents with the existing PDF driver in R and use external software to introduce active links. We don't know at present what external software would be useful for this. Another possibility is to establish a "text" like function for use with the pdf driver that allows the user to give vectors of x and y coordinates and a vector of metadata to be bound to the coordinates as active link targets. -- This is a request for advice/comments/plans related to annotated visualizations created with R but exportable to non-R users. Other graphical formats and languages not mentioned here may be relevant and comments to this effect are welcome. -- --- Vince Carey, PhD Ass't Prof Med (Biostatistics) Harvard Medical School Channing Laboratory - ph 6175252265 fa 6177311541 cell 8572126768 181 Longwood Ave Boston MA 02115 USA stvjc@channing.harvard.edu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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"> </MAP> 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 plot(1:10,1:10,href=links) 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. Baz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi In terms of related plans: over the (southern) summer I plan to have a student take a look at producing SVG output from R. There are many possibilities for embedding metadata within such output. You may want to talk to Naras (Balasubramanian Narasimhan naras@stat.stanford.edu) who has worked on the SVG stuff a bit already and has thought a bit about how to include the metadata. Paul "Vincent J. Carey, Jr." wrote:> > How can R users take advantage of the "active PDF" paradigm > for annotation of statistical graphics? 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. > > One possibility is to generate pdf graphical documents with the > existing PDF driver in R and use external software to introduce > active links. We don't know at present what external software > would be useful for this. > > Another possibility is to establish a "text" like function for > use with the pdf driver that allows the user to give vectors > of x and y coordinates and a vector of metadata to be bound to the > coordinates as active link targets. > > -- > > This is a request for advice/comments/plans related to > annotated visualizations created with R but exportable to > non-R users. Other graphical formats and > languages not mentioned here may be relevant and comments > to this effect are welcome. > > -- > --- > Vince Carey, PhD > Ass't Prof Med (Biostatistics) > Harvard Medical School > Channing Laboratory - ph 6175252265 fa 6177311541 cell 8572126768 > 181 Longwood Ave Boston MA 02115 USA > > stvjc@channing.harvard.edu > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x5392 paul@stat.auckland.ac.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._