Skip to content

Commit

Permalink
MNT: Warn on using pixel marker for scatter()
Browse files Browse the repository at this point in the history
Improves on matplotlib#11460.
  • Loading branch information
timhoffm committed Dec 18, 2024
1 parent 3aebcb7 commit bc60ed4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 not necessarily 1 pixel in "
"size. Use the square marker 's' instead to suppress this warning."
)

if isinstance(marker, mmarkers.MarkerStyle):
marker_obj = marker
Expand Down

0 comments on commit bc60ed4

Please sign in to comment.