[R] distance betwenn axis and axis annotation
murdoch at stats.uwo.ca
Wed Feb 18 12:52:16 CET 2009
Luis Ridao Cruz wrote:
> How can I specify the distance between the axis and axis annotation?
I don't think you can do this directly, but you can do it using mtext.
x <- 1:10
y <- rnorm(10)
at <- pretty(x)
min <- par("usr")
max <- par("usr")
at <- at[ at >= min & at <= max] # pretty extends the range
axis(1, at=at, labels=FALSE)
mtext(at, side=1, at=at, line=3)
More information about the R-help