Suppress ticks in plot in r

SHRram picture SHRram · May 1, 2012 · Viewed 48.5k times · Source

I want to remove labels and axis from X axis, however adding new ticks.

plot(1:10, ylab = "")
at1 <- seq(1, 10, 0.1)
axis(side = 1, at = at1, labels = FALSE)

I could not get rid of y labels.

Answer

GSee picture GSee · May 1, 2012

see ?par You need the xaxt argument

plot(1:10, ylab = "", xaxt='n')