# How to remove Y-axis labels in R?

R ProgrammingServer Side ProgrammingProgramming

When we create a plot in R, the Y-axis labels are automatically generated and if we want to remove those labels, the plot function can help us. For this purpose, we need to set ylab argument of plot function to blank as ylab="" and yaxt="n" to remove the axis title. This is a method of base R only, not with ggplot2 package.

## Example

x<-rnorm(10)
y<-rnorm(10)
plot(x,y)

## Example

plot(x,y,ylab="",yaxt="n")

## Output

Published on 06-Feb-2021 09:14:58