9
我使用此代码回归线一起策划一些数据系列:绘制的回归线通过原点
ggplot(dt1.melt, aes(x=lower, y=value, group=variable, colour=variable)) +
geom_point(shape=1) +
geom_smooth(method=lm,
se=FALSE)
不过,我需要限制回归线是通过原点的所有系列 - 中与标准R图上的abline(lm(Q75~-1+lower,data=dt1))
一样。
任何人都可以解释如何在ggplot
做到这一点?
使用'公式= Y〜X-1''geom_smooth'调用 – James
@詹姆斯感谢,那精美的作品 - 请说一个答案,我会标记为正确的。 –