0
我有一个简单的ggplot,我需要合并一个对数刻度y轴英寸的麻烦。我明白,ggplot是正确的弯曲线一旦我的轴有对数刻度,但我需要线仍然线性连接我的数据点。ggplot对数刻度y轴直线
这是我的代码:
forexample<-transform(example, EXP=factor(EXP, levels=unique(EXP)))
plot<-ggplot(forexample, aes(x=EXP, y=concentration, shape=sample))
+ stat_summary(aes(group = sample), fun.y = mean, geom = 'line', alpha=1, size=0.5)
+ stat_summary(aes(group = sample), fun.y = mean, geom = 'point', alpha=1, size=4) +
theme_bw() +
coord_trans(y = "log10")
我的数据结构是这样的:
sample concentration EXP
H 0.08 Ex1
H 0.07 Ex2
M 2.00 Ex1
M 0.50 Ex2
R 0.01 Ex1
...
我试图Zoltáns建议在这个问题:“GGPLOT2登录Y的规模轴导致曲线“,但它没有为我工作。 (ggplot2 log scale of y axis causing curved lines)
如果有人能帮助我,我真的很高兴! 谢谢:)
非常感谢你:) – Pauline