MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_errorbar_shape

Function test_errorbar_shape

lib/matplotlib/tests/test_axes.py:4628–4643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4626
4627
4628def test_errorbar_shape():
4629 fig = plt.figure()
4630 ax = fig.gca()
4631
4632 x = np.arange(0.1, 4, 0.5)
4633 y = np.exp(-x)
4634 yerr1 = 0.1 + 0.2*np.sqrt(x)
4635 yerr = np.vstack((yerr1, 2*yerr1)).T
4636 xerr = 0.1 + yerr
4637
4638 with pytest.raises(ValueError):
4639 ax.errorbar(x, y, yerr=yerr, fmt='o')
4640 with pytest.raises(ValueError):
4641 ax.errorbar(x, y, xerr=xerr, fmt='o')
4642 with pytest.raises(ValueError):
4643 ax.errorbar(x, y, yerr=yerr, xerr=xerr, fmt='o')
4644
4645
4646@image_comparison(['errorbar_limits.png'], style='mpl20')

Callers

nothing calls this directly

Calls 4

figureMethod · 0.80
gcaMethod · 0.80
sqrtMethod · 0.80
errorbarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…