您好我正在尝试通过在ggplot中使用hexplots来查看可视化数据集的不同方法.我基本上想要一个带有1.黄土线2的十六进制图.回归线3.x = y线 - >相当于abline(0,1)
到目前为止,我已经提出了这种代码:
c <- ggplot(mtcars, aes(qsec, wt)) c+stat_binhex()+stat_smooth(method="loess", colour="red")+stat_smooth(method='lm', se=FALSE, colour="orange")+ geom_abline(intercept=0, slope=1)
这给出了下图,但我仍然没有看到x = y参考线.请帮忙.我不确定为什么它不起作用.谢谢