How to make the axes widths in a plot wider than default in base R?

R ProgrammingServer Side ProgrammingProgramming

The axes widths are generally very thin in plots but we can make them wider. This will be useful if we want to highlight the axes labels for reasons such as getting attention of the viewer on axes labels etc. To increase the width of the axes in a base R plot, we can use axis function and set the lwd argument.

Example

> x<-rnorm(1000)
> hist(x)
> axis(side=1,lwd=4)

Output:

Example

> axis(side=2,lwd=4)

Output:

raja
Published on 21-Nov-2020 06:11:04
Advertisements