回答編集履歴
1
画像追加
answer
CHANGED
|
@@ -1,1 +1,16 @@
|
|
|
1
|
+
求めているのがどっちかわからなかったのでどっちもやってみました。
|
|
2
|
+
```python
|
|
3
|
+
import matplotlib
|
|
4
|
+
import matplotlib.pyplot as plt
|
|
5
|
+
|
|
6
|
+
x = [1,2,3,4,5]
|
|
7
|
+
y = [10,20,30,40,50]
|
|
8
|
+
yerr = [[2, 1, 3, 3, 2], [4, 3, 4, 2, 4]]
|
|
9
|
+
plt.errorbar(x,y,yerr,label="", fmt='ro', ecolor='g')
|
|
10
|
+
plt.show()
|
|
11
|
+
plt.errorbar(x,y,xerr=yerr[0], yerr=yerr[1],label="", fmt='ro', ecolor='g')
|
|
12
|
+
plt.show()
|
|
13
|
+
```
|
|
14
|
+

|
|
15
|
+

|
|
1
16
|
[pylab_examples example code: errorbar_demo.py](https://matplotlib.org/1.2.1/examples/pylab_examples/errorbar_demo.html)
|