Re: [R] boxplot changes fontsize of labels

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 06 Jun 2008 19:14:59 +0100 (BST)

Please read the help for par(mfrow)! AFAICS this is nothing to do with boxplot().

           In a layout with exactly two rows and columns the base value
           of '"cex"' is reduced by a factor of 0.83: if there are three
           or more of either rows or columns, the reduction factor is
           0.66.

See also the 'consider the alternatives' in that entry.

On Fri, 6 Jun 2008, Sebastian Merz wrote:

> Hi all!
>
> So far I learned some R but finilizing my plots so they look
> publishable seems not to be possible.
>
> I set up some boxplots. Everything works well but when I put more then
> two of them in one plot the labels of the axes appear smaller than the
> normal font size.
>
>> x <- rnorm(30)
>> y <- rnorm(30)
>> par(mfrow=c(1,4))
>> boxplot(x,y, names=c("horray", "hurra"))
>> mtext("Jubel", side=1, line=2)

>
> In case I take one or two boxplots this does not happen:
>> par(mfrow=c(1,2))
>> boxplot(x,y, names=c("horray", "hurra"))
>> mtext("Jubel", side=1, line=2)
>
> The cex.axis seems not to be changed, as setting it to 1.0 doesn't
> change the behaviour. If cex.axis=1.3 in the first example the font
> size used by boxplot and by mtext is about the same. But as I use a
> function to draw quite some of these plots this "hack" is not a proper
> solution.
>
> I couldn't find anything about this behaviour in the documention or
> the inet.
>
> Can anybody explain? All hints are appriciated.
>
> Thanks,
> S. Merz
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 06 Jun 2008 - 19:33:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 Jun 2008 - 20:31:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive