Skip to content
Prev 43114 / 398506 Next

Axes Ticks

On Thu, Jan 22, 2004 at 01:32:29PM -0500, ivo welch wrote:
y <- c(-4,3,-2,1)
xlab <- c("time 1", "time 2", "time 3", "time 4")
x <-1:4
plot(x,y, type="b", axes=FALSE)
axis(2)
axis(1, at=x, labels=xlab) 
box()				     

If you use 'axis(1, at=x)' you can do without xlab, but get only the bare
numbers. box() is needed to frame the whole thing as the default axes=TRUE
for plot() does.

Gruss,  Dirk