Skip to content
Prev 44308 / 398506 Next

resizing a plot area when using mfrow

On Mon, 2004-02-16 at 12:31, Rajarshi Guha wrote:
One approach is to adjust the page size that you use for the EPS output,
since you are forcing a square plot region. A rough guess might be to
use a page width that is twice the page height. Be sure to use 'paper =
"special"' to adjust the EPS bounding box.


# Specify the EPS output
postscript(file = "RPlot.eps", onefile = TRUE, paper = "special",
           width = 10, height = 5, horizontal = FALSE)

# Set 1 row, 2 cols, square plot region
par(mfrow=c(1,2), pty = "s")

# Generate two plots
plot(1:5)
plot(1:10)

# Close postscript device
dev.off()

Take a look at RPlot.eps and see if this is what you require.

HTH,

Marc Schwartz