【发布时间】:2016-08-01 01:19:59
【问题描述】:
我想在半对数点图中添加一条线性回归线,但我似乎无法让它工作。
mm= c(44.637, 41.252, 38.717, 36.176, 34.275, 32.366, 30.676, 29.407, 27.715, 26.866)
bp = c(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000)
梯形图 = data.frame(mm, bp)
ggplot2.dotplot(data=ladder, xName='bp', yName='mm', mainTitle='Ladder') + scale_y_log10(breaks = trans_breaks('log10', function(x) 10^x), 标签= trans_format('log10',math_format(10^.x)))
我尝试过 >geom_smooth、>geom_abline 和 >stat_smooth。这些都不起作用。非常感谢您的帮助。
【问题讨论】:
标签: r plot ggplot2 linear-regression graphing