以置信区间绘制指数图

时间:2018-11-07 13:40:35

标签: r ggplot2 plot exponential

我有四个细胞样本,它们以指数形式扩展,每个样本都从不同的时间点开始。我是R的新手,但正在尝试绘制95%置信区间阴影区域的指数曲线,以查看它们是否匹配并交叉。我相信我应该使用ggplot,但无法获取它来显示数据。我将不胜感激。

到目前为止,我已经做到了:

ggplot(series, aes(series$day, series$`118Q`)) + 
  theme_bw() + 
  geom_point(data = series, aes(x = series$day, y = series$`118Q`)) + 
  geom_path() + 
  xlim(2000, 3000) +
  ylim(0, 200)

我的数据:

day,29Q,71Q,97Q,118Q
3,30.42333333,,,
7,,,,
10,30.49333333,,,
14,,,,
18,30.48666667,,,
21,,,,
25,30.48666667,,,
28,,,,
35,30.47333333,,,
38,30.47333333,,,
41,,,,
44,30.45666667,,,
3,30.37333333,,,
7,,,,
10,30.44333333,,,
14,,,,
18,30.43666667,,,
21,,,,
25,30.43666667,,,
28,,,,
35,30.42333333,,,
38,30.42333333,,,
41,,,,
44,30.40666667,,,
3,30.37333333,,,
7,,,,
10,30.44333333,,,
14,,,,
18,30.43666667,,,
21,,,,
25,30.43666667,,,
28,,,,
35,30.42333333,,,
38,30.42333333,,,
41,,,,
44,30.40666667,,,
1303,,69.42333333,,
1307,,,,
1310,,69.46666667,,
1314,,,,
1318,,69.51,,
1321,,,,
1325,,69.47666667,,
1328,,,,
1335,,69.47,,
1338,,69.44666667,,
1341,,,,
1344,,69.44333333,,
1303,,68.42333333,,
1307,,,,
1310,,68.46666667,,
1314,,,,
1318,,68.51,,
1321,,,,
1325,,68.47666667,,
1328,,,,
1335,,68.47,,
1338,,68.44666667,,
1341,,,,
1344,,68.44333333,,
1303,,69.52333333,,
1307,,,,
1310,,69.56666667,,
1314,,,,
1318,,69.61,,
1321,,,,
1325,,69.57666667,,
1328,,,,
1335,,69.57,,
1338,,69.54666667,,
1341,,,,
1344,,69.54333333,,
1841,,,,
1845,,,97.6866667,
1848,,,,
1852,,,97.6866667,
1856,,,,
1859,,,98.5666667,
1863,,,,
1866,,,98.5766667,
1873,,,,
1876,,,,
1879,,,99.39,
1882,,,,
1841,,,,
1845,,,97.4966667,
1848,,,,
1852,,,97.6633333,
1856,,,,
1859,,,98.6633333,
1863,,,,
1866,,,98.69,
1873,,,98.69,
1876,,,,
1879,,,99.6533333,
1882,,,,
1841,,,,
1845,,,97.5916667,
1848,,,,
1852,,,97.675,
1856,,,,
1859,,,98.615,
1863,,,,
1866,,,98.63333335,
1873,,,98.69,
1876,,,,
1879,,,99.52166665,
1882,,,,
2143,,,,117.8233333
2147,,,,
2150,,,,118.7833333
2154,,,,
2158,,,,118.7333333
2161,,,,
2165,,,,
2168,,,,
2175,,,,120.5566667
2178,,,,
2181,,,,
2184,,,,121.48
2143,,,,117.8233333
2147,,,,
2150,,,,118.7833333
2154,,,,
2158,,,,118.7333333
2161,,,,
2165,,,,
2168,,,,
2175,,,,120.5566667
2178,,,,
2181,,,,
2184,,,,121.51
2143,,,,117.8233333
2147,,,,
2150,,,,118.1922222
2154,,,,
2158,,,,118.8983333
2161,,,,
2165,,,,
2168,,,,
2175,,,,120.5055556
2178,,,,
2181,,,,
2184,,,,121.60125

我希望实现这样的效果,尽管每个样本的指数线都在整个图形上前后投影:

enter image description here

0 个答案:

没有答案