use 'none'
instead of '.'
:
import matplotlib.pyplot as plt
x = np.arange(0.1, 4, 0.5)
y = np.exp(-x)
yerr = 0.1 + 0.2*np.sqrt(x)
xerr = 0.1 + yerr
plt.figure()
plt.errorbar(x, y, 0.2, 0.4,'none')
plt.title("Simplest errorbars, 0.2 in x, 0.4 in y")
result:
P.S. this is slightly modified version of part of the example of pylab here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…