Skip to content

Commit c0841ca

Browse files
timhoffmQuLogic
andauthored
MNT: Warn on using pixel marker for scatter() (#29342)
* MNT: Warn on using pixel marker for scatter() Improves on #11460. * Update lib/matplotlib/axes/_axes.py Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> --------- Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 677d990 commit c0841ca

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
@@ -4920,6 +4920,12 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
49204920
marker_obj = marker
49214921
else:
49224922
marker_obj = mmarkers.MarkerStyle(marker)
4923+
if cbook._str_equal(marker_obj.get_marker(), ","):
4924+
_api.warn_external(
4925+
"The pixel maker ',' is not supported on scatter(); using "
4926+
"a finite-sized square instead, which is not necessarily 1 pixel in "
4927+
"size. Use the square marker 's' instead to suppress this warning."
4928+
)
49234929

49244930
path = marker_obj.get_path().transformed(
49254931
marker_obj.get_transform())

0 commit comments

Comments
 (0)