From wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|  Thu Jun  9 13:03:10 2022
From: wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n| (Viechtbauer, Wolfgang (NP))
Date: Thu, 9 Jun 2022 11:03:10 +0000
Subject: [Rd] Behavior of ylim in boxplot() when horizontal=TRUE
Message-ID: <6677093c725645a68ee92cdf054fdf87@UM-MAIL3214.unimaas.nl>

Hi all,

I just noticed something when using boxplot(). Say we have this boxplot:

boxplot(mpg ~ cyl, data=mtcars, xlab="Cylinders", ylab="Miles per Galon", ylim=c(10,40), log="y")

ylab, ylim, and log="y" are all consistently adjusting things on the y-axis (the numeric 'outcome' variable).

Now let's use horizontal=TRUE:

boxplot(mpg ~ cyl, data=mtcars, las=1, xlab="Miles per Galon", ylab="Cylinders", horizontal=TRUE, ylim=c(10,40), log="x")

Now xlab and log="x" are used to adjust things on the x-axis, but ylim still needs to be used to adjust the range of the numeric 'outcome' variable. Not a big deal, but this seems a bit inconsistent.

Best,
Wolfgang



[Rd] Behavior of ylim in boxplot() when horizontal=TRUE
Viechtbauer, Wolfgang (NP