From c8d6b41c81fe9a585e2845c5d35989fe3b464de9 Mon Sep 17 00:00:00 2001 From: Ruth Comer <10599679+rcomer@users.noreply.github.com> Date: Sat, 11 Jan 2025 19:16:38 +0000 Subject: [PATCH] Backport PR #29456: DOC: Fix type descriptions in fill_between docstring --- lib/matplotlib/axes/_axes.py | 8 ++++---- lib/matplotlib/collections.py | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index bf4e0b031b59..b83ead051b12 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5599,16 +5599,16 @@ def _fill_between_x_or_y( Parameters ---------- - {ind} : array (length N) + {ind} : array-like The {ind} coordinates of the nodes defining the curves. - {dep}1 : array (length N) or scalar + {dep}1 : array-like or float The {dep} coordinates of the nodes defining the first curve. - {dep}2 : array (length N) or scalar, default: 0 + {dep}2 : array-like or float, default: 0 The {dep} coordinates of the nodes defining the second curve. - where : array of bool (length N), optional + where : array-like of bool, optional Define *where* to exclude some {dir} regions from being filled. The filled regions are defined by the coordinates ``{ind}[where]``. More precisely, fill between ``{ind}[i]`` and ``{ind}[i+1]`` if diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index f18d5a4c3a8c..b94410bcc140 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -1282,16 +1282,16 @@ def __init__( - 'x': the curves are ``(t, f1)`` and ``(t, f2)``. - 'y': the curves are ``(f1, t)`` and ``(f2, t)``. - t : array (length N) + t : array-like The ``t_direction`` coordinates of the nodes defining the curves. - f1 : array (length N) or scalar + f1 : array-like or float The other coordinates of the nodes defining the first curve. - f2 : array (length N) or scalar + f2 : array-like or float The other coordinates of the nodes defining the second curve. - where : array of bool (length N), optional + where : array-like of bool, optional Define *where* to exclude some {dir} regions from being filled. The filled regions are defined by the coordinates ``t[where]``. More precisely, fill between ``t[i]`` and ``t[i+1]`` if @@ -1362,16 +1362,16 @@ def set_data(self, t, f1, f2, *, where=None): Parameters ---------- - t : array (length N) + t : array-like The ``self.t_direction`` coordinates of the nodes defining the curves. - f1 : array (length N) or scalar + f1 : array-like or float The other coordinates of the nodes defining the first curve. - f2 : array (length N) or scalar + f2 : array-like or float The other coordinates of the nodes defining the second curve. - where : array of bool (length N), optional + where : array-like of bool, optional Define *where* to exclude some {dir} regions from being filled. The filled regions are defined by the coordinates ``t[where]``. More precisely, fill between ``t[i]`` and ``t[i+1]`` if