[R] Axes Ticks

Andy Bunn abunn at montana.edu
Thu Jan 22 20:13:31 CET 2004


You need to look at ?axis. Try this:

y <- c(-4,3,-2,1)
x <- c("time 1", "time 2", "time 3", "time 4")
plot(seq(1,length(x), by = 1), y, type = "b", axes = FALSE, xlab =
"Times", ylab = "Stuff")
axis(1, at = seq(1,length(x), by = 1), labels = x)
axis(2)

HTH, Andy




More information about the R-help mailing list