[R] plot mutiple graphs in one .eps

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Wed Feb 26 13:47:03 CET 2003


Christoph Lehmann wrote:
> how can I use the following approach correctly to print all plots into
> one .eps file? thanks for a hint, even a documentation describing it
> easily:
> 
> 
>>opar <- par(mfrow = c(4,4), pty= "s", oma = c(0, 0, 0, 0))
>>postscript("bivreg01.eps")
>>plot(CMEDV ~ CRIM, HousePrice)
>>plot(CMEDV ~ ZN, HousePrice)
>>plot(CMEDV ~ INDUS, HousePrice)
>>plot(CMEDV ~ CHAS, HousePrice)
>>plot(CMEDV ~ NOX, HousePrice)
>>plot(CMEDV ~ RM, HousePrice)
>>plot(CMEDV ~ AGE, HousePrice)
>>plot(CMEDV ~ DIS, HousePrice)
>>plot(CMEDV ~ RAD, HousePrice)
>>plot(CMEDV ~ TAX, HousePrice)
>>plot(CMEDV ~ PTRATIO, HousePrice)
>>plot(CMEDV ~ B, HousePrice)
>>plot(CMEDV ~ LSTAT, HousePrice)
>>dev.off()
> 
> 
> thanks
> christoph


Place the postscript() before the call to par():

postscript("bivreg01.eps")
opar <- par(mfrow = c(4,4), pty= "s", oma = c(0, 0, 0, 0))
...
par(opar)
dev.off()


Sundar




More information about the R-help mailing list