在绘图区域内放置仅 x 轴的刻度标签

Mit*_*ati 5 plot r

是否可以在绘图区域内放置仅 x 轴的刻度标签?我在尝试:

axis(1,at=c(0:71),c(rep(0:23,3)),cex.axis=.7, font=1,tck=.01)
Run Code Online (Sandbox Code Playgroud)

看起来:

par(mgp=c(0,-1.4, 0)) 
Run Code Online (Sandbox Code Playgroud)

xy刻度标签都放在绘图区域内。

Tho*_*mas 4

为什么不使用以下pos参数将刻度线绘制在您想要的位置axis()

plot(0:72, xaxt="n")
text(0:71, -1, rep(0:23, 3), cex = 0.5)
axis(1, at=c(0:71), NA, cex.axis=.7, font=1, tck=.01)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述