也许这是最愚蠢的问题,它为我工作了100万次,但是在图中看不到我的Ab线。我在做什么错了?
我的代码
plot =ggplot(data=NULL, aes(x= data$ï..Year, y= loggdp))+
geom_line(col="blue")+
geom_abline( slope=0.01994632, intercept=11.96591, col="red" )
这是我得到的图
答案 0 :(得分:1)
可能是因为它在可见区域之外。对于x=2000
(2000年),您通过的斜率和截距(大致)通过的值为11.96 + 2000*0.02 = 51.96
,该值不在此图中的y轴范围内。