@@ -4454,9 +4454,6 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
44544454 collection .update (kwargs )
44554455
44564456 if colors is None :
4457- if norm is not None and not isinstance (norm , mcolors .Normalize ):
4458- raise ValueError (
4459- "'norm' must be an instance of 'mcolors.Normalize'" )
44604457 collection .set_array (c )
44614458 collection .set_cmap (cmap )
44624459 collection .set_norm (norm )
@@ -4770,11 +4767,6 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
47704767 offset_position = "data"
47714768 )
47724769
4773- # Check for valid norm
4774- if norm is not None and not isinstance (norm , mcolors .Normalize ):
4775- msg = "'norm' must be an instance of 'mcolors.Normalize'"
4776- raise ValueError (msg )
4777-
47784770 # Set normalizer if bins is 'log'
47794771 if bins == 'log' :
47804772 if norm is not None :
@@ -5590,9 +5582,6 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
55905582 `~matplotlib.pyplot.imshow` expects RGB images adopting the straight
55915583 (unassociated) alpha representation.
55925584 """
5593- if norm is not None and not isinstance (norm , mcolors .Normalize ):
5594- raise ValueError (
5595- "'norm' must be an instance of 'mcolors.Normalize'" )
55965585 if aspect is None :
55975586 aspect = rcParams ['image.aspect' ]
55985587 self .set_aspect (aspect )
@@ -5882,9 +5871,6 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
58825871
58835872 collection .set_alpha (alpha )
58845873 collection .set_array (C )
5885- if norm is not None and not isinstance (norm , mcolors .Normalize ):
5886- raise ValueError (
5887- "'norm' must be an instance of 'mcolors.Normalize'" )
58885874 collection .set_cmap (cmap )
58895875 collection .set_norm (norm )
58905876 collection .set_clim (vmin , vmax )
@@ -6099,9 +6085,6 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
60996085 ** kwargs )
61006086 collection .set_alpha (alpha )
61016087 collection .set_array (C )
6102- if norm is not None and not isinstance (norm , mcolors .Normalize ):
6103- raise ValueError (
6104- "'norm' must be an instance of 'mcolors.Normalize'" )
61056088 collection .set_cmap (cmap )
61066089 collection .set_norm (norm )
61076090 collection .set_clim (vmin , vmax )
@@ -6238,11 +6221,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
62386221 Notes
62396222 -----
62406223 .. [notes section required to get data note injection right]
6241-
62426224 """
6243- if norm is not None and not isinstance (norm , mcolors .Normalize ):
6244- raise ValueError (
6245- "'norm' must be an instance of 'mcolors.Normalize'" )
62466225
62476226 C = args [- 1 ]
62486227 nr , nc = np .shape (C )[:2 ]
0 commit comments