Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 521f668

Browse files
committed
Add test for fmt=='none'
1 parent e1f6464 commit 521f668

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lib/matplotlib/tests/test_axes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,6 +2454,17 @@ def test_errorbar_limits():
24542454
ax.set_title('Errorbar upper and lower limits')
24552455

24562456

2457+
def test_errobar_nonefmt():
2458+
# Check that passing 'none' as a format still plots errorbars
2459+
x = np.arange(5)
2460+
y = np.arange(5)
2461+
2462+
plotline, _, barlines = plt.errorbar(x, y, xerr=1, yerr=1, fmt='none')
2463+
assert plotline is None
2464+
for errbar in barlines:
2465+
assert np.any(errbar.get_color() != [0, 0, 0, 0])
2466+
2467+
24572468
@image_comparison(baseline_images=['hist_stacked_stepfilled',
24582469
'hist_stacked_stepfilled'])
24592470
def test_hist_stacked_stepfilled():

0 commit comments

Comments
 (0)