[R] Displaying ylab in mfrow

Peter Ehlers ehlers at ucalgary.ca
Sun Jan 16 12:40:40 CET 2011


On 2011-01-15 18:54, Kumar Mainali wrote:
> Dear R users,
>
> I cannot display ylab with the following code while trying to stack 7 rows
> of 3 histograms each. Thanks in advance!
>
> par(mfrow=c(7,3))
> par(mar=c(2,2,2,2))
> par(oma=c(5,5,0,0))
>
> with (newdata<- subset(table, Month1 == "1"), hist(newdata$CarapWid,
> breaks=5*(0:80), col="gray80", main="All individuals", xlab="", xlim
> =c(15,85), ylab="April 2007"))

Your code is neither reproducible nor minimal.
And it doesn't look as though it would produce
anything like what you seem to want.

I suspect that you may wish to look at ?title
and in particular at the 'ylab' and 'outer'
arguments.

Or you might consider using lattice or ggplot2.

Peter Ehlers



More information about the R-help mailing list