我正在用
绘制一个轴a <- factor(letters[seq( from = 1, to = 26 )])
b <- 1:26
plot(a, b, axes = FALSE)
axis(1, at = a, labels = a, las = 2)
如何获得所有刻度线,但只能每第n个标记,例如(每7天):
答案 0 :(得分:1)
您可以拨打axis
两次,首先绘制所有刻度线,然后再贴上标签:
c = a[seq(1, length(a),7)]
axis(1, at=a, labels = FALSE)
axis(1, at=c, labels = c, las = 2)