Python 我是否能够在我的错误条函数ax.errorbar中绘制两条曲线?

Python 我是否能够在我的错误条函数ax.errorbar中绘制两条曲线?,python,matplotlib,attributeerror,errorbar,Python,Matplotlib,Attributeerror,Errorbar,我正在尝试绘制两条直线图,都带有误差条。只有y分量有错误。我不断得到一个属性错误 当我试图在函数中放入xerr=None或yerr=0.20时,也会出现一个错误。 以下是我的一段代码: import matplotlib.pyplot as plt import numpy as np M = [22, 55, 41, 68, 81] T1 = [TA1, TA2, TA3, TA4, TA5] T2 = [TB1, TB2, TB3, TB4, TB5] fig, ax = plt.su

我正在尝试绘制两条直线图,都带有误差条。只有y分量有错误。我不断得到一个属性错误

当我试图在函数中放入xerr=None或yerr=0.20时,也会出现一个错误。 以下是我的一段代码:

import matplotlib.pyplot as plt
import numpy as np

M = [22, 55, 41, 68, 81]

T1 = [TA1, TA2, TA3, TA4, TA5]
T2 = [TB1, TB2, TB3, TB4, TB5]

fig, ax = plt.subplots()

# Axes.errorbar(self, x, y, yerr=None, xerr=None, fmt='', ecolor=None, elinewidth=None, capsize=None,
#  barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, errorevery=1, capthick=None, *, data=None, **kwargs)

# Error in my period: Combined Standard Uncertainty of my reaction time (0.20) and stopwatch on my phone's lowest measurement (0.005)


yerr = 0.20
xerr = 0
ax.errorbar(M, T1, M, T2, yerr, xerr, yerr, xerr)


ax.set_xlabel('Measurment of a (mm)')
ax.set_ylabel('y-axis')
ax.set_title('Measurment of T (sec)')

plt.show()
谢谢大家!

请参阅。