From c08ea090fd7063d78a660e95dc946c78d1610194 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Mon, 15 Jun 2026 06:26:34 +0300 Subject: [PATCH 1/2] fix: allow array-like fill_between where masks --- lib/matplotlib/axes/_axes.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.pyi b/lib/matplotlib/axes/_axes.pyi index e2904da3efbe..3e954a81190f 100644 --- a/lib/matplotlib/axes/_axes.pyi +++ b/lib/matplotlib/axes/_axes.pyi @@ -482,7 +482,7 @@ class Axes(_AxesBase): x: ArrayLike, y1: ArrayLike | float, y2: ArrayLike | float = ..., - where: Sequence[bool] | None = ..., + where: ArrayLike | None = ..., interpolate: bool = ..., step: Literal["pre", "post", "mid"] | None = ..., *, @@ -494,7 +494,7 @@ class Axes(_AxesBase): y: ArrayLike, x1: ArrayLike | float, x2: ArrayLike | float = ..., - where: Sequence[bool] | None = ..., + where: ArrayLike | None = ..., step: Literal["pre", "post", "mid"] | None = ..., interpolate: bool = ..., *, From 72dbcf613b47d5fb251af665fdc619cb94335a19 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Mon, 15 Jun 2026 17:37:23 +0300 Subject: [PATCH 2/2] fix: update pyplot boilerplate for fill_between typing --- lib/matplotlib/pyplot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index f8f2f94a7075..bb39cd5b483e 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -3499,7 +3499,7 @@ def fill_between( x: ArrayLike, y1: ArrayLike | float, y2: ArrayLike | float = 0, - where: Sequence[bool] | None = None, + where: ArrayLike | None = None, interpolate: bool = False, step: Literal["pre", "post", "mid"] | None = None, *, @@ -3524,7 +3524,7 @@ def fill_betweenx( y: ArrayLike, x1: ArrayLike | float, x2: ArrayLike | float = 0, - where: Sequence[bool] | None = None, + where: ArrayLike | None = None, step: Literal["pre", "post", "mid"] | None = None, interpolate: bool = False, *,