Skip to content

Commit d297d60

Browse files
committed
Make it possible to control snapping from the outside.
1 parent e586c09 commit d297d60

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/axes.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -7460,6 +7460,9 @@ def pcolor(self, *args, **kwargs):
74607460
*alpha*: ``0 <= scalar <= 1`` or *None*
74617461
the alpha blending value
74627462
7463+
*snap*: bool
7464+
Whether to snap the mesh to pixel boundaries.
7465+
74637466
Return value is a :class:`matplotlib.collections.Collection`
74647467
instance.
74657468
@@ -7603,7 +7606,9 @@ def pcolor(self, *args, **kwargs):
76037606
ec.lower() == "none"):
76047607
kwargs['antialiaseds'] = False
76057608

7606-
collection = mcoll.PolyCollection(verts, snap=False, **kwargs)
7609+
kwargs.setdefault('snap', False)
7610+
7611+
collection = mcoll.PolyCollection(verts, **kwargs)
76077612

76087613
collection.set_alpha(alpha)
76097614
collection.set_array(C)

0 commit comments

Comments
 (0)