我想在PSO
和PSOA
中使用geom_ribbon绘制两个置信区间。我的数据集由
id Meta prob mean lowerci upperci
1 PSO 0.1 6705423.00 9913.939 151671.3
2 PSO 0.2 6705423.00 24352.031 393418.7
3 PSO 0.3 6705423.00 64719.335 444035.0
4 PSO 0.4 6705423.00 85058.168 600026.5
5 PSO 0.5 6705423.00 140437.916 756819.1
6 PSO 0.6 6705423.00 179236.196 952494.7
7 PSO 0.7 6705423.00 211278.350 773605.9
8 PSO 0.8 6705423.00 169915.851 1078624.1
9 PSO 0.9 6705423.00 263216.389 936007.2
10 PSO 1.0 6705423.00 266200.032 1061063.0
11 PSOA 0.1 52460.43 9913.939 151671.3
12 PSOA 0.2 202813.18 24352.031 393418.7
13 PSOA 0.3 252836.56 64719.335 444035.0
14 PSOA 0.4 329661.97 85058.168 600026.5
15 PSOA 0.5 450833.52 140437.916 756819.1
16 PSOA 0.6 424932.84 179236.196 952494.7
17 PSOA 0.7 486794.40 211278.350 773605.9
18 PSOA 0.8 634493.58 169915.851 1078624.1
19 PSOA 0.9 521509.18 263216.389 936007.2
20 PSOA 1.0 648183.78 266200.032 1061063.0
我尝试使用上面的代码,但我无法在PSO中绘制geom_ribbon
(" HERE"图中)。
p <- ggplot(data=dat2, aes(x=prob, y=mean, colour=Meta)) + geom_point() + geom_line()
p <- p + geom_ribbon(aes(ymin=dat2$lowerci, ymax=dat2$upperci), linetype=2, alpha=0.1)
答案 0 :(得分:2)