From 6dadeca73c5d5a60999e68351018fa3928db55a1 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Wed, 27 Sep 2023 13:07:30 -0500 Subject: [PATCH] Add ArrayLike to scatter c arg type hint Closes #26936 --- lib/matplotlib/axes/_axes.pyi | 2 +- lib/matplotlib/pyplot.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.pyi b/lib/matplotlib/axes/_axes.pyi index 96ea087f7eb9..9602db3b950c 100644 --- a/lib/matplotlib/axes/_axes.pyi +++ b/lib/matplotlib/axes/_axes.pyi @@ -402,7 +402,7 @@ class Axes(_AxesBase): x: float | ArrayLike, y: float | ArrayLike, s: float | ArrayLike | None = ..., - c: Sequence[ColorType] | ColorType | None = ..., + c: ArrayLike | Sequence[ColorType] | ColorType | None = ..., marker: MarkerType | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 74a73725d5d9..f48ca312e58e 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -3670,7 +3670,7 @@ def scatter( x: float | ArrayLike, y: float | ArrayLike, s: float | ArrayLike | None = None, - c: Sequence[ColorType] | ColorType | None = None, + c: ArrayLike | Sequence[ColorType] | ColorType | None = None, marker: MarkerType | None = None, cmap: str | Colormap | None = None, norm: str | Normalize | None = None,