[R] Multiple figures margin problem
mnstn
pavan.namd at gmail.com
Fri Feb 12 22:49:24 CET 2010
Hello All,
I am trying to make a figure with 3x2 plots in it. Let us name the plots as
such:
1 2
3 4
5 6
I begin my script with:
par(mfcol=c(3,2))
par(oma=c(0,0,0,0)) --> This is for a postscript figure so I really don't
need the outer margins.
d=5
par(mar=c(d,d,d,d)) --> This applies to all the 6 plots.
Now if d=0, plots 1-2,3-4 and 5-6 will have no gap between them and 1-3-5
and 2-4-6 will not have any spacing either. This is how I want it. But I
also want y axis points and y label for 1, 3 and 5 and x axis points and
labels for 5 and 6. With d=0, there is no space left for these labels. With
d=5 (for ex.) I can have the labels but it also introduces a gap of 'd' text
lines between the plots. I have tried:
par(mar=c(0,d,0,0))
plot 1
par(mar=c(0,d,0,0))
plot 3
par(mar=c(d,d,0,0))
plot 5
par(mar=c(0,0,0,0))
plot 2
par(mar=c(0,0,0,0))
plot 4
par(mar=c(d,0,0,0))
plot 6
But in this approach, the plots are all not of the same size because of
differences in margins and I want all the plots to be square and look
similar when printed. Do have any comments or suggestions on how to go about
doing it?
Thanks,
MoonStone
--
View this message in context: http://n4.nabble.com/Multiple-figures-margin-problem-tp1490455p1490455.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list