Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2820,6 +2820,9 @@ def errorbar(self, x, y, yerr=None, xerr=None,
fmt_style_kwargs = {k: v for k, v in
zip(('linestyle', 'marker', 'color'),
_process_plot_format(fmt)) if v is not None}
if fmt == 'none':
# Remove alpha=0 color that _process_plot_format returns
fmt_style_kwargs.pop('color')

if ('color' in kwargs or 'color' in fmt_style_kwargs or
ecolor is not None):
Expand Down
12 changes: 12 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2454,6 +2454,18 @@ def test_errorbar_limits():
ax.set_title('Errorbar upper and lower limits')


@cleanup
def test_errobar_nonefmt():
# Check that passing 'none' as a format still plots errorbars
x = np.arange(5)
y = np.arange(5)

plotline, _, barlines = plt.errorbar(x, y, xerr=1, yerr=1, fmt='none')
assert plotline is None
for errbar in barlines:
assert np.all(errbar.get_color() == mcolors.to_rgba('C0'))


@image_comparison(baseline_images=['hist_stacked_stepfilled',
'hist_stacked_stepfilled'])
def test_hist_stacked_stepfilled():
Expand Down