From fbbbc53dcf0812fa40d28bac6f4eef8fb0e9bac2 Mon Sep 17 00:00:00 2001 From: Jirka Date: Sat, 21 Oct 2023 16:23:23 +0200 Subject: [PATCH 1/2] docs: adding explanation for color in `set_facecolor` --- lib/matplotlib/axes/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 8d29df3b72e8..ee74ab188d98 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -1499,7 +1499,7 @@ def set_facecolor(self, color): Parameters ---------- - color : color + color : color defined by string name, char abbreviation or hex, see :doc:`gallery/color/named_colors` """ self._facecolor = color self.stale = True From 3bd567202c82038a5d8e5f424ac6ae5b3a5437f7 Mon Sep 17 00:00:00 2001 From: Jirka Date: Wed, 25 Oct 2023 08:17:56 +0200 Subject: [PATCH 2/2] suggestion --- lib/matplotlib/axes/_base.py | 2 +- lib/matplotlib/axes/_secondary_axes.py | 2 +- lib/matplotlib/figure.py | 4 ++-- lib/matplotlib/lines.py | 2 +- lib/matplotlib/patches.py | 4 ++-- lib/matplotlib/text.py | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index ee74ab188d98..b113b0f21156 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -1499,7 +1499,7 @@ def set_facecolor(self, color): Parameters ---------- - color : color defined by string name, char abbreviation or hex, see :doc:`gallery/color/named_colors` + color : color; see :ref:`colors_def` """ self._facecolor = color self.stale = True diff --git a/lib/matplotlib/axes/_secondary_axes.py b/lib/matplotlib/axes/_secondary_axes.py index f0ab4f3e3be8..4c757f61c7b6 100644 --- a/lib/matplotlib/axes/_secondary_axes.py +++ b/lib/matplotlib/axes/_secondary_axes.py @@ -233,7 +233,7 @@ def set_color(self, color): Parameters ---------- - color : color + color : color; see :ref:`colors_def` """ axis = self._axis_map[self._orientation] axis.set_tick_params(colors=color) diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 2b83a7ae4a73..baea9232800f 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -410,7 +410,7 @@ def set_edgecolor(self, color): Parameters ---------- - color : color + color : color; see :ref:`colors_def` """ self.patch.set_edgecolor(color) @@ -420,7 +420,7 @@ def set_facecolor(self, color): Parameters ---------- - color : color + color : color; see :ref:`colors_def` """ self.patch.set_facecolor(color) diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 31b931a52c82..0b4b8d48adc2 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -1056,7 +1056,7 @@ def set_color(self, color): Parameters ---------- - color : color + color : color; see :ref:`colors_def` """ mcolors._check_color_like(color=color) self._color = color diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 7b9e6e7aa060..d1537322ab76 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -332,7 +332,7 @@ def set_edgecolor(self, color): Parameters ---------- - color : color or None + color : color or None; see :ref:`colors_def` """ self._original_edgecolor = color self._set_edgecolor(color) @@ -350,7 +350,7 @@ def set_facecolor(self, color): Parameters ---------- - color : color or None + color : color or None; see :ref:`colors_def` """ self._original_facecolor = color self._set_facecolor(color) diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 7a58ce717200..6371e03603d6 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -965,7 +965,7 @@ def set_backgroundcolor(self, color): Parameters ---------- - color : color + color : color; see :ref:`colors_def` See Also -------- @@ -985,7 +985,7 @@ def set_color(self, color): Parameters ---------- - color : color + color : color; see :ref:`colors_def` """ # "auto" is only supported by axisartist, but we can just let it error # out at draw time for simplicity. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy