[R] graphics in batch mode

Kaspar Pflugshaupt pflugshaupt at geobot.umnw.ethz.ch
Thu Apr 11 15:31:42 CEST 2002


On 11.4.2002 14:35 Uhr, Agustin Lobo wrote:

> The R-intro guide states that:
> "The graphics facilities can be used in both interactive and batch
> modes,.."
> 
> but I'm trying both
> 
> R BATCH commands.file
> and
> R --no-save < commands.file
> 
> and, although I get no errors and
> the output file with the results is
> written to disk, I get no graphics.
> (I want the R function to leave
> results in a file that a shell script
> reads and use, and to draw a graphic).

What kind of graphics file did you try to write? For me, postscript() or
pdf() work fine in any situation.

[trying to remember past issues on this list]

Some other graphics drivers depend on Xwindows to work and, for some
reasons, don't work from a batch file. I believe that the driver bitmap()
will work in any case, have a look at that.

[trying the "obvious"]

You did close the graphics device after plotting, didn't you?  :-)


HTH

Kaspar Pflugshaupt

-- 

Kaspar Pflugshaupt
Geobotanisches Institut
Zuerichbergstr. 38
CH-8044 Zuerich

Tel. ++41 1 632 43 19
Fax  ++41 1 632 12 15

mailto:pflugshaupt at geobot.umnw.ethz.ch
privat:pflugshaupt at mails.ch
http://www.geobot.umnw.ethz.ch

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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