Errorbar 函数#

这展示了误差条方法的最基本用法。在这种情况下,为x方向和y方向的误差提供了常数值。

import matplotlib.pyplot as plt
import numpy as np

# example data
x = np.arange(0.1, 4, 0.5)
y = np.exp(-x)

fig, ax = plt.subplots()
ax.errorbar(x, y, xerr=0.2, yerr=0.4)
plt.show()
errorbar

参考文献

以下示例展示了以下函数、方法、类和模块的使用:

由 Sphinx-Gallery 生成的图库