From ripley@stats.ox.ac.uk  Mon Dec 10 07:41:35 2001
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Mon, 10 Dec 2001 08:41:35 +0100 (MET)
Subject: [Rd] boxplot labels incorrect when horizontal = TRUE (PR#1207)
Message-ID: <200112100741.IAA20825@pubhealth.ku.dk>

On Mon, 10 Dec 2001 rnassar@duke.edu wrote:

> #Example:
>
> y <- rnorm(10)
> group <- gl(2,5)
>
> plot(y ~ group, horizontal = TRUE)  # BUG: default xlab & ylab interchanged
> plot(y ~ group, horizontal = FALSE) # OK: supplies correct default xlab & ylab

Um.  That's plot.formula, not boxplot.  horizontal = TRUE is *not* a
documented argument to plot.formula.  If you pass arguments to boxplot
through ... (rather than just par values), you may well get unexpected
results.

To fix this needs plot.formula to recognize horizontal, and that's
an API change which I don't advocate during feature freeze.
Generally, not doing something which is not documented to happen is not a
bug, so I'll put this on the wishlist.

> # Using boxplot() instead of plot() omits default axis labels altogether
> # (not sure if this is intentional):
>
> boxplot(y ~ group, horizontal = FALSE) # no default axis labels supplied
> boxplot(y ~ group, horizontal = TRUE)  # no default axis labels supplied

Yes, it's intentional.  You can always use title().


-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] boxplot labels incorrect when horizontal = TRUE (PR#1207)
ripley@stats.ox.ac.uk