[R] PostScript output error

Paul Murrell pm254 at medschl.cam.ac.uk
Thu Sep 9 12:26:49 CEST 1999


>> > I found a problem in generated postscript file which
>> > has following sequence:
>> >
>> >   x <- 1:30
>> >   postscript("output.ps")
>> >   par(mfg=c(1,1,2,2))
>> >   plot(x,sin(x))
>> >   plot(x,sin(x))
>> >   plot(x,sin(x))
>> >   plot(x,sin(x))
>> >   dev.off()

as Brian Ripley pointed out, par(mfcol=c(2,2)) or par(mfrow=c(2,2)) will
"fix" your "problem".

the intended use of par(mfg) is to allow you to add extra bits to graphs in
a multiple-graph arrangement.  for example, something like ...

for (i in 1:4) plot(i)
mtext("some text i forgot to add when i first made this graph")

however, this does not excuse R  for misbehaving in your example.  I will
take a look at what we should do to fix it - thanks for bringing this
problem to our attention !


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