Default device instead of ``No graphics device is active''
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Mon, 12 Jan 1998 17:38:16 +0100
in RHOME/src/ :
grep DevInit */*.[ch]
reveals only a few calls such as
if(!DevInit) error("No graphics device is active\n");
(in graphics/graphics.c and main/par.c).
Couldn't we startup a default device instead of having the error message?
The Default device would be
Unix, interactive: x11
Unix, batch: postscript
Win, interactive: windows
Win, batch: postscript ??
Mac, interactive: macintosh
Mac, batch: postscript ????
[ one could even define
default.device <- x11
in Rprofile.unix, etc.
and have the same .First function
(which could be moved out of profile to base
.First <- function() if(interactive()) default.device()
]
-- If I remember properly, this is also how S4 behaves..
Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._