From 5bb96627449258d614344fba60f5bab3c075eb38 Mon Sep 17 00:00:00 2001 From: as691454 Date: Mon, 4 Dec 2017 20:29:56 -0600 Subject: [PATCH 1/2] Fix for axes.errorbars to enable use of line style and marker properties from axes.prop_cycle --- lib/matplotlib/axes/_axes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 5d05169728aa..a795639ed97d 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2822,7 +2822,10 @@ def errorbar(self, x, y, yerr=None, xerr=None, plot_line = (fmt.lower() != 'none') label = kwargs.pop("label", None) - fmt_style_kwargs = {k: v for k, v in + if fmt=='': + fmt_style_kwargs={} + else: + 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': @@ -2886,6 +2889,9 @@ def errorbar(self, x, y, yerr=None, xerr=None, eb_cap_style = dict(base_style) # eject any marker information from format string eb_cap_style.pop('marker', None) + eb_lines_style.pop('markerfacecolor', None) + eb_lines_style.pop('markeredgewidth', None) + eb_lines_style.pop('markeredgecolor', None) eb_cap_style.pop('ls', None) eb_cap_style['linestyle'] = 'none' if capsize is None: From 46508af72b191823502330b7fd17a9be167ac49f Mon Sep 17 00:00:00 2001 From: as691454 Date: Tue, 5 Dec 2017 23:21:12 -0600 Subject: [PATCH 2/2] Adjusted for pep8 --- lib/matplotlib/axes/_axes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index a795639ed97d..e9d39033e32a 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2822,8 +2822,8 @@ def errorbar(self, x, y, yerr=None, xerr=None, plot_line = (fmt.lower() != 'none') label = kwargs.pop("label", None) - if fmt=='': - fmt_style_kwargs={} + if fmt == '': + fmt_style_kwargs = {} else: fmt_style_kwargs = {k: v for k, v in zip(('linestyle', 'marker', 'color'),