📜  误差线图python代码示例

📅  最后修改于: 2022-03-11 14:45:08.589000             🧑  作者: Mango

代码示例1
x = [0,1,2,3,4,5]
y = [3,2,4,5,1,5]
yerr=[0.3,0.2,0.4,0.5,0.1,0.5]
fig, ax = plt.subplots(figsize=(8,8))
ax.errorbar(x, y, yerr=yerr, fmt='-o', color='k')
ax.set_title('My title')
ax.set_ylabel('My ylabel')
ax.set_xlabel('My xlabel')
plt.show()