Python 为什么plt.errorbox给我连续的图形,而我只需要点数据?

Python 为什么plt.errorbox给我连续的图形,而我只需要点数据?,python,matplotlib,errorbar,Python,Matplotlib,Errorbar,我正在使用matplotlib中的errorbox绘制一个图形,其中 x1 = (0, 100, 60, 20, 80, 40) y1 = (0.0, 0.058823529411764705, 0.058823529411764705, 0.0, 0.0, 0.0) plt.figure() plt.errorbar(x1, y1) plt.title("Errors") plt.show() 这将给我连续的线,而不是单独的6个数据点? 如何将其修复为仅产生6个数据点?我尝试使用'o'作为

我正在使用matplotlib中的errorbox绘制一个图形,其中

x1 = (0, 100, 60, 20, 80, 40)
y1 = (0.0, 0.058823529411764705, 0.058823529411764705, 0.0, 0.0, 0.0)

plt.figure()
plt.errorbar(x1, y1)
plt.title("Errors")
plt.show()
这将给我连续的线,而不是单独的6个数据点?
如何将其修复为仅产生6个数据点?我尝试使用'o'作为pet.errorbar(x1,y1,'o')的第三个参数。

您可以使用以下属性:

plt.errorbar(x1, y1,ls='None', marker = 'o')

您可以使用以下属性:

plt.errorbar(x1, y1,ls='None', marker = 'o')