【发布时间】:2018-05-29 02:34:14
【问题描述】:
您好,我创建了一个线性模型和一个回归图 - 但是,我希望将模型结果显示在图本身上 - 如下图所示:
如何在图上显示关键结果?以下是我的情节代码:
library(ggplot2)
ggplot(HP_crime15, aes (x = as.numeric(HP_crime15$Theft15), y =
as.numeric(HP_crime15$X2015))) + geom_point(shape=1) +
geom_smooth(method=lm) + xlab ("Recorded number of Thefts") +
ylab("House prices (£)") + ggtitle("Title")
【问题讨论】:
标签: r ggplot2 linear-regression coefficients