多个mean_sdl,绘制平滑

时间:2014-02-26 22:31:45

标签: r ggplot2 mean confidence-interval

如何在同一输出中完全绘制p7p6,其中m7和m6是通过融合不同的数据集获得的?提前谢谢

p7 <- ggplot(m7,aes(x=time,y=value)) +stat_summary(fun.data = "mean_sdl", geom = "smooth")
p6 <- ggplot(m6,aes(x=time,y=value)) +stat_summary(fun.data = "mean_sdl", geom = "smooth")

1 个答案:

答案 0 :(得分:1)

你可以试试这个:

p7 <- ggplot(m7,aes(x=time,y=value)) +stat_summary(fun.data = "mean_sdl", geom = "smooth")
p6 <- p7 + stat_summary(aes(x=time,y=value), fun.data = "mean_sdl", geom = "smooth", data = m6)