以下代码显示了 abline 的奇怪行为:绘制的线未达到指定的截距。我使用的是 Rstudio 版本 0.98.976。有什么提示可以避免这个问题吗?
x=seq(1,10)
y=seq(1,10)
m=lm(y~x)
summary(m)
plot(x,y)
abline(1.123e-15, 1.000e+00)
abline(2, 1.000e+00)
abline(3, 1.000e+00)
abline(4, 1.000e+00)
Run Code Online (Sandbox Code Playgroud)
提前致谢,

这只是一个角度问题,因为截距只是ywhile的值x=0
x=seq(1,10)
y=seq(1,10)
m=lm(y~x)
summary(m)
plot(x,y, ylim = c(0,10), xlim= c(0,10))
abline(1.123e-15, 1)
abline(2, 1.00)
abline(3, 1.00)
abline(4, 1.00)
abline(v=0)
Run Code Online (Sandbox Code Playgroud)
