I have a panel containing three plots. How can I use par
to specify the width and height of the main panel so it is always at a fixed size?
views:
612answers:
2
+7
A:
You do that in the device, e.g.
x11(width=4, height=6)
and similarly for the file-based ones
pdf("/tmp/foo.pdf", width=4, height=6)
You can read the physical size via par("cin")
etc but not set it.
Dirk Eddelbuettel
2009-08-14 17:10:57
+3
A:
I usually set this at the start of my session with windows.options
:
windows.options(width=10, height=10)
# plot away
plot(...)
If you need to reset to "factory settings":
dev.off()
windows.options(reset=TRUE)
# more plotting
plot(...)
ars
2009-08-14 17:34:36
This is Windows specific, I think.
ariddell
2009-10-05 14:39:16