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

Skip to content

Commit 94f7e68

Browse files
author
bakes
committed
Changed behavior to only pass norm=mcolors.NoNorm() when the user doesn't pass a norm
1 parent 33ca222 commit 94f7e68

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7662,8 +7662,9 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
76627662
if 'interpolation' in kwargs:
76637663
raise TypeError(
76647664
"spy() got an unexpected keyword argument 'interpolation'")
7665-
ret = self.imshow(mask, norm=mcolors.NoNorm(),
7666-
interpolation='nearest', aspect=aspect,
7665+
if 'norm' not in kwargs:
7666+
kwargs['norm'] = mcolors.NoNorm()
7667+
ret = self.imshow(mask, interpolation='nearest', aspect=aspect,
76677668
origin=origin, **kwargs)
76687669
else:
76697670
if hasattr(Z, 'tocoo'):

0 commit comments

Comments
 (0)