Skip to content

Commit 0ff0600

Browse files
committed
MNT: Warn on using pixel marker for scatter()
Improves on #11460.
1 parent 3aebcb7 commit 0ff0600

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/axes/_axes.py

+6
Original file line numberDiff line numberDiff line change
@@ -4938,6 +4938,12 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
49384938
marker_obj = marker
49394939
else:
49404940
marker_obj = mmarkers.MarkerStyle(marker)
4941+
if cbook._str_equal(marker_obj.get_marker(), ","):
4942+
_api.warn_external(
4943+
"The pixel maker ',' is not supported on scatter(). Fallback "
4944+
"to a finite-sized square, which is not necessarily 1 pixel in "
4945+
"size. Use the square marker 's' instead to suppress this warning."
4946+
)
49414947

49424948
path = marker_obj.get_path().transformed(
49434949
marker_obj.get_transform())

0 commit comments

Comments
 (0)