[R] [BUG] or [undocumented] boxplot - horizontal swaps ylim and xlim

Rainer M Krug Rainer at krugs.de
Fri Feb 13 11:53:33 CET 2015


When using the function boxplot() together with the argument

,----
| horizontal = TRUE
`----

xlim and ylim become swapped, i.e. ylim refers to the x-axis instead of
the y-axis:

--8<---------------cut here---------------start------------->8---
x <- runif(1000)
boxplot(x)
boxplot(
   x,
   ylim = c(0.2, 0.8)
   )
boxplot(
   x,
   ylim = c(0.2, 0.8),
   horizontal=TRUE
   )
--8<---------------cut here---------------end--------------->8---

This is either a bug or undocumented.

Cheers,

Rainer

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20150213/cadfcc43/attachment.bin>


More information about the R-help mailing list