[R] size of graphs when using multiple figures by row

Nerak nerak.t at hotmail.com
Tue Mar 13 10:24:42 CET 2012


Hi all,
I have a basic question concerning graphs in R.  I’m using the par()
function and I’m working with multiple figures by row (mfrow) but my the
hight of my figures become compressed. I have 4 rows and 2 columns (because
I want to plot 8 histograms (freq = FALSE ) on it. I know I can adapt my
margins with for example “oma” and “mai” but I don’t know how to choose the
size of the figure… I read something about pin. That this should go about
‘the current plot dimensions, (width, height), in inches. But I don’t know
which values I should use. Because I always get the remark ‘plot region too
large’.

I would like to have for example figures of 5,8 by 5,8 cm (is 2,3 by 2,3
inches I think). But I don’t know how to specify this…. I'm getting lost
with the par() function

Hard to give my data online for a reproducible example but with for example
this, I have the same problems:

par(mfrow=c(4,2),oma=c(2,2,2,2), mai=c(0.6, 0.6, 0.6, 0.6))
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen")
hist(islands, freq=FALSE,col="blue",main="test")
mtext("testen") 

(normally, I specify my breaks, ylab and xlab, xlim and y lim)

I hope someone can help me.
Many thanks,
Nerak


--
View this message in context: http://r.789695.n4.nabble.com/size-of-graphs-when-using-multiple-figures-by-row-tp4468610p4468610.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list