From e4fe84ed8ad94cca288e35e09ff61f10ec1b71b6 Mon Sep 17 00:00:00 2001 From: William Qian Date: Fri, 22 Jul 2022 13:48:25 -0400 Subject: [PATCH 1/5] Add markerfacealt to pass-through arguments for error bar lines --- lib/matplotlib/axes/_axes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index e9b3e078b2a0..2fc974c8ff71 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3467,6 +3467,7 @@ def _upcast_err(err): # Eject any line-specific information from format string, as it's not # needed for bars or caps. for key in ['marker', 'markersize', 'markerfacecolor', + 'markerfacecoloralt', 'markeredgewidth', 'markeredgecolor', 'markevery', 'linestyle', 'fillstyle', 'drawstyle', 'dash_capstyle', 'dash_joinstyle', 'solid_capstyle', 'solid_joinstyle', From c0ac694c1ba56bb30b551c5ea7c56e38f43d8865 Mon Sep 17 00:00:00 2001 From: William Qian Date: Fri, 22 Jul 2022 14:22:55 -0400 Subject: [PATCH 2/5] Update documentation to reflect which kwargs errorbar() passes on --- lib/matplotlib/axes/_axes.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 2fc974c8ff71..f282d376201a 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3367,7 +3367,25 @@ def errorbar(self, x, y, yerr=None, xerr=None, property names, *markerfacecolor*, *markeredgecolor*, *markersize* and *markeredgewidth*. - Valid kwargs for the marker properties are `.Line2D` properties: + Valid kwargs for the marker properties are: + + - marker + - markersize + - markerfacecolor + - markerfacecoloralt + - markeredgewidth + - markeredgecolor + - markevery + - linestyle + - fillstyle + - drawstyle + - dash_capstyle + - dash_joinstyle + - solid_capstyle + - solid_joinstyle + - dashes + + Refer to the corresponding `.Line2D` property for more details: %(Line2D:kwdoc)s """ From 9a79204e6d50f1a25d2669f1ee2834408bb265ec Mon Sep 17 00:00:00 2001 From: William Qian Date: Fri, 22 Jul 2022 14:29:12 -0400 Subject: [PATCH 3/5] Document API changes --- doc/api/next_api_changes/behavior/23475-WLQ.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/api/next_api_changes/behavior/23475-WLQ.rst diff --git a/doc/api/next_api_changes/behavior/23475-WLQ.rst b/doc/api/next_api_changes/behavior/23475-WLQ.rst new file mode 100644 index 000000000000..9f46e0ade107 --- /dev/null +++ b/doc/api/next_api_changes/behavior/23475-WLQ.rst @@ -0,0 +1,5 @@ +The markerfacecoloralt parameter to Line2D is now supported by axes.errorbar +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- markerfacecoloralt is now passed to the line plotter from axes.errorbar +- Documentation for axes.errorbar how accurately lists which properties are + passed on to Line2D, rather than claiming that all kwargs are passed on From 1fab387724846f4b5fbc2076bf0297e77d3e0869 Mon Sep 17 00:00:00 2001 From: William Qian Date: Fri, 22 Jul 2022 14:53:25 -0400 Subject: [PATCH 4/5] Refactor documentation list of supported Line2D kwargs --- lib/matplotlib/axes/_axes.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index f282d376201a..6a0179e4ded5 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3369,21 +3369,21 @@ def errorbar(self, x, y, yerr=None, xerr=None, Valid kwargs for the marker properties are: - - marker - - markersize - - markerfacecolor - - markerfacecoloralt - - markeredgewidth - - markeredgecolor - - markevery - - linestyle - - fillstyle - - drawstyle - - dash_capstyle - - dash_joinstyle - - solid_capstyle - - solid_joinstyle - - dashes + - *dashes* + - *dash_capstyle* + - *dash_joinstyle* + - *drawstyle* + - *fillstyle* + - *linestyle* + - *marker* + - *markeredgecolor* + - *markeredgewidth* + - *markerfacecolor* + - *markerfacecoloralt* + - *markersize* + - *markevery* + - *solid_capstyle* + - *solid_joinstyle* Refer to the corresponding `.Line2D` property for more details: From 3e4810a446c26a5728519f6aabb16239ad5fde22 Mon Sep 17 00:00:00 2001 From: Will Qian Date: Sat, 30 Jul 2022 05:09:35 -0400 Subject: [PATCH 5/5] Update lib/matplotlib/axes/_axes.py Fix tabbing on documentation Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- lib/matplotlib/axes/_axes.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 6a0179e4ded5..8b396d7ce745 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3369,21 +3369,21 @@ def errorbar(self, x, y, yerr=None, xerr=None, Valid kwargs for the marker properties are: - - *dashes* - - *dash_capstyle* - - *dash_joinstyle* - - *drawstyle* - - *fillstyle* - - *linestyle* - - *marker* - - *markeredgecolor* - - *markeredgewidth* - - *markerfacecolor* - - *markerfacecoloralt* - - *markersize* - - *markevery* - - *solid_capstyle* - - *solid_joinstyle* + - *dashes* + - *dash_capstyle* + - *dash_joinstyle* + - *drawstyle* + - *fillstyle* + - *linestyle* + - *marker* + - *markeredgecolor* + - *markeredgewidth* + - *markerfacecolor* + - *markerfacecoloralt* + - *markersize* + - *markevery* + - *solid_capstyle* + - *solid_joinstyle* Refer to the corresponding `.Line2D` property for more details: