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.

Was it helpful?

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

enter image description here

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)))

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top