问题描述
我正在尝试绘制两个带有误差线的线图。只有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,xerr)
ax.set_xlabel('Measurment of a (mm)')
ax.set_ylabel('y-axis')
ax.set_title('Measurment of T (sec)')
plt.show()
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)