Dear All,

I've noticed an inconsistency between boxplot & barplot regarding the
interaction between
switching to a horizontal graph and the limits.

par(mfrow = c(2, 2))
boxplot(1:10, xlim = c(0.1, 5), ylim = c(1, 10),
              log = "y", horizontal=FALSE, xlab = "X", ylab = "Y")
axis(1)
# Changing to horizontal, xlim <-> ylim
# log = y is still the y-axis. ylab is still the y-axis
boxplot(1:10, xlim = c(0.1, 5), ylim = c(1, 10), log = "y",
                       horizontal=TRUE, xlab = "X", ylab = "Y")
axis(2)

barplot(2, xlim = c(0.1, 5), ylim = c(0.1, 10),
                  log = "y", horiz=FALSE, xlab = "X", ylab = "Y")
axis(1)
# Changing to horizontal, xlim still refers to xlim
# log = y is still the y-axis. ylab is still the y-axis
barplot(2, xlim = c(0.1, 5), ylim = c(0.1, 10), log = "y",
                horiz=TRUE, xlab = "X", ylab = "Y")
axis(2)

Thanks

Colin

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to