0

I want to ask how to change the size of xlab, ylab, and title in beanplot function from beanplot package as I cannot find certain paremters for that.

Thanks in advance

I could not find any parameters to change size of texts in beanplot

  • Welcome to Stackoverflow. Please add a [MRE]. Maybe check out https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Peter Dec 21 '22 at 07:30

1 Answers1

0

The beanplot function uses the base graphics system. This means you can modify all graphics parameters using the par function.

# Save graphics parameters, setup 1x2 figure for the next plot
opar <- par(mfrow = c(1,2), cex.lab=1, cex.main=1)

beanplot(rnorm(22), rnorm(22), rnorm(22), main="Test!", rnorm(3), xlab="X-label")

# Change the size of the title and x-axis label
par(cex.lab=2, cex.main=3)
beanplot(rnorm(22), rnorm(22), rnorm(22), main="Test!", rnorm(3), xlab="X-label (x2)")

# Return to the previous state
par(opar)
Edward
  • 10,360
  • 2
  • 11
  • 26