From 575a2469aec02452ec5c7b33acbc113121c4cea7 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Wed, 18 Dec 2024 09:53:18 +0100 Subject: [PATCH] MNT: Warn on using pixel marker for scatter() Improves on #11460. --- lib/matplotlib/axes/_axes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index f03de3236c8d..b29531d260c0 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -4933,6 +4933,12 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None, # load default marker from rcParams if marker is None: marker = mpl.rcParams['scatter.marker'] + if marker == ",": + _api.warn_external( + "The pixel maker ',' is not supported on scatter(). Fallback " + "to a finite-sized square, which is necessarily 1 pixel in " + "size. Use the square marker 's' to suppress this warning." + ) if isinstance(marker, mmarkers.MarkerStyle): marker_obj = marker