Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a7a405

Browse files
committed
Merge pull request matplotlib#2726 from mdboom/pcolorsnap
Don't snap pcolor
2 parents e807990 + d297d60 commit 6a7a405

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/axes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7462,6 +7462,9 @@ def pcolor(self, *args, **kwargs):
74627462
*alpha*: ``0 <= scalar <= 1`` or *None*
74637463
the alpha blending value
74647464
7465+
*snap*: bool
7466+
Whether to snap the mesh to pixel boundaries.
7467+
74657468
Return value is a :class:`matplotlib.collections.Collection`
74667469
instance.
74677470
@@ -7605,6 +7608,8 @@ def pcolor(self, *args, **kwargs):
76057608
ec.lower() == "none"):
76067609
kwargs['antialiaseds'] = False
76077610

7611+
kwargs.setdefault('snap', False)
7612+
76087613
collection = mcoll.PolyCollection(verts, **kwargs)
76097614

76107615
collection.set_alpha(alpha)

0 commit comments

Comments
 (0)