[R] dev.print and X11(canvas = "black")
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Mar 2 17:59:35 CET 2004
On Tue, 2 Mar 2004, Jeffrey J. Hallman wrote:
> Jim Lemon made essentially the same suggestion: run the code that
> created the plot twice, once with X11 as the active device, and again
> with postscript as the active device.
>
> The trouble with this is that is doesn't handle plots that the user has
> edited. I have some charts that users add things to interactively,
> using combinations of locator(), text(), mtext(), and arrows(). There's
> no nice way to know what a user has done to a plot before he attempts to
> print it.
Yes, see the sections on `Graphics hardcopy' in section A.1 of MASS4 for
exactly this comment: it is hardly news.
You could record what the users do as they do it by using your own
versions of these functions.
> I know that R is internally maintaining a display list. Is there a way
> to access that without dropping into C? And what's in it, anyway?
Not really (recordPlot etc does), and not documented AFAIK (but Paul
Murrell will be able to correct me if I am wrong here). However, I am
pretty sure that it has the actual plot colours and not the colour numbers
in it.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list