我想绘制这个:
plot( 0, 0, type = "n",xlim =c(-3, 3), ylim =c(-5, 5), xlab = "x", ylab = "y" )
但是,在图表上,它显示 y 轴范围不是 c(-5, 5) 而是 c(-4,4)。
最佳答案
它是基于刻度标签,我们可以做到
plot( 0, 0, type = "n",xlim =c(-3, 3), ylim =c(-4, 4),
xlab = "x", ylab = "y" , yaxt = 'n')
axis(2, -4:4)
关于r - R 中的绘图() : ylim range don't match the y axis range on graph,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57938953/