Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我绘制数据时:
plot(c(1.2,4,7),col=2)
如何显示我的图表,使其仅在 x 轴上显示整个值?
首先关闭plot语句中的 x 轴:
plot
plot(c(1.2, 4, 7), col=2, xaxt="n")
然后添加您选择的轴,例如:
axis(1, at=round(x, 0))
x您想要刻度线的未舍入值在哪里
x