[R] Need suggestions for nice handling of MANY plots

White.Denis@epamail.epa.gov White.Denis at epamail.epa.gov
Wed Mar 27 20:34:22 CET 2002




> I have a collection of SAS code that helps people review large
> amounts of data on a regular basis. It does this by using SAS's proc
> gplot with a "by" statement to prepare as many as 400 (yes, 400)
> separate graphs. The code is run on a remote unix host, and displayed
> on the reviewer's local desktop using X11 and SAS's display manager.
> The process is initiated from a web browser.
>
> The good side of using proc gplot is that after all 400 have been
> displayed once, the user can use the PageUp/PageDown keys or the
> scroll bar to move through the plots, choosing which ones to spend
> more time with, etc.. It's also reasonably fast. The graphs, all of
> them, are evidently stored somehow, so that they remain available
> until SAS is exited.
>
> The question is, how close can I come to providing this kind of
> capability using R or Splus?
>
> Displaying each graph once is not a problem, it's the going back and
> reviewing them part I need ideas for.
>
> My current best idea is to shove them all into a pdf file, which can
> be displayed inline in the reviewer's browser, or possibly downloaded.
>
> Thanks for any ideas
> -Don
>

Here is an example of what I would do on Windows.  First create PNG
files in one folder, like this for example:

library (maptree)
data (oregon.bird.dist)
data (oregon.bird.names)
data (oregon.grid)
data (oregon.border)

for (i in 1:20) {
  filename <- paste (row.names (oregon.bird.names)[i], ".png", sep="")
  png (filename, width=400, height=380)
  group <- oregon.bird.dist[, i] + 1
  names (group) <- row.names (oregon.bird.dist)
  map.groups (oregon.grid, group, col=c("white", "dark gray"))
  lines (oregon.border)
  mtext (oregon.bird.names[i, 2], side=3, line=0)
  graphics.off ()
}

Then use the freeware viewer XnView which will scroll through images
using the thumb wheel.

Denis White
   US EPA, 200 SW 35th St, Corvallis, Oregon, 97333 USA
   voice: 541.754.4476, email: white.denis at epa.gov
   web: www.epa.gov/wed/pages/staff/white/


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list