How do I make the y-axis values bold in R?
Question
I have a box plot and want to make the values of the y-axis bold. I know how to make the y-axis title bold.
Solution
Use par
:
par(font.axis = 2) # 2 means 'bold'
boxplot(1:10)
An alternative way using axis
(proposed by @joran):
boxplot(1:10, yaxt = "n") # suppress y axis
axis(side = 2, font = 2) # 'side = 2' means y axis
You can reset to normal typeface using par(font.axis = 1)
.
OTHER TIPS
Using lattice
library(lattice)
bwplot(~1:10,scales=list(x=list(font=2,cex=5)))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow