20

I'm having issues in locating an answer for this, as I don't want to increase the size of the x-axis label, but the names attribute of my boxplot.

I am generating a 1x3 subplot, with 3 boxes shown within each boxplot.

data1 = c(d1, d3, d3)
data2 = c(e1, e2, e3)
data3 = c(f1, f2, f3)
lbls = c("Label 1", "Label 2", "Label 3")
par(mfrow=c(1,3))
boxplot(data1, names=lbls, ylab="Components", main="First Plot", ylim=c(0,1500))
boxplot(data2, names=lbls, ylab="Components", main="Second Plot", ylim=c(0,1500))
boxplot(data3, names=lbls, ylab="Components", main="Third Plot", ylim=c(0,1500))

I have tried playing around with things like par(cex.lab=1.5), boxplot(..., label.cex=1.5), and so on, but nothing actually increases the size of the names field, only the label axes.

zx8754
  • 52,746
  • 12
  • 114
  • 209
erik
  • 3,810
  • 6
  • 32
  • 63

1 Answers1

51

Using the par() command with the appropriate command will allow you to resize it.

Try using one of the two following commands with varying sizes and it should work out for you.

par(cex.lab=1.5) # is for y-axis

par(cex.axis=1.5) # is for x-axis
Marek Židek
  • 809
  • 1
  • 15
  • 31
Swiftfoottim
  • 551
  • 5
  • 4