[R] Postscript query
p.murrell at auckland.ac.nz
Mon Sep 10 23:09:20 CEST 2001
> I am experiencing some interesting results when I attempt to save
> graphical output to a file via "postscript". I am running R version
> 1.3.0 on a Mandrake 8.0 system under Xemacs 21.1.14 via ESS 5.1.18.
> Once I have generated a graph, I have attempted to save the graph with
> statements like
> postscript("myplot.eps",horizontal=FALSE, height=8, width=6)
> however, the resulting postscript file appears to be, um, blank (i.e.
> when I open the file in the gimp or some other graphics editor, there
> isn't anything there).
The postscript() function only creates a new, _blank_, postscript device.
Subsequent drawing operations, such as plot(), lines(), ..., will go to that
If you have created a graph in a window and want to "save" it to postscript,
you need to either ...
(i) open a postscript device using postscript() and then rerun the graphics
commands to reproduce your graph on the postscript device, or ...
(ii) use one of the functions dev.copy(), dev.print(), or dev.copy2eps() to
copy the contents of the window to a postscript device.
Hope that helps.
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