0
votes

I have written this code for a boxplot. I am changing the size of axis title for both x and y-axes, but it's not changing. I looked for various answers and tried but didn't get any change. Could anyone please help me out?

Sradmi<-read_xlsx("Boxplot.xlsx", sheet = 16)
par(family="serif")
boxplot(Sradmi, main ="Solar radiation (miroc_miroc5)", cex.axis=1.2, cex.lab=2, cex.main=1, col="red", ylim = c(10, 30), ann=FALSE)
mtext(side = 1, text = expression(bold("Months")),line=2.5)
mtext(side = 2, text = expression(bold("Solar radiation (MJ/m"^"2"*")")), line=2.5)
1

1 Answers

1
votes

Seems like you are using mtext to place the axis labels. In that case you need to change the cex parameter inside mtext:

boxplot(Sradmi, main ="Solar radiation (miroc_miroc5)", cex.axis=1.2, cex.lab=2, cex.main=1, col="red", ylim = c(10, 30), ann=FALSE)
mtext(side = 1, text = expression(bold("Months")),line=2.5, cex=1.2)
mtext(side = 2, text = expression(bold("Solar radiation (MJ/m"^"2"*")")), line=2.5, cex=1.2)