import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei']#用来正常显示中文标签
plt.rcParams['axes.unicode_minus']=False#用来正常显示负号
x=[0,1,2,3,4]
y=[5,3,6,8,9]
#plt.plot(x,y,'bo-')
error=[1,1.5,0.3,0.7,0.4]
plt.errorbar(x,y,yerr=error,color='r',marker='o',capsize=5,markerfacecolor='b',mec='g')
#plt.errorbar(x,y,xerr=error)
误差条形图
最新推荐文章于 2024-07-13 21:36:56 发布