File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -847,12 +847,12 @@ def set_filterrad(self, s):
847847 def set_norm (self , norm ):
848848 if self ._A is not None :
849849 raise RuntimeError ('Cannot change colors after loading data' )
850- super (NonUniformImage , self ).set_norm (self , norm )
850+ super (NonUniformImage , self ).set_norm (norm )
851851
852852 def set_cmap (self , cmap ):
853853 if self ._A is not None :
854854 raise RuntimeError ('Cannot change colors after loading data' )
855- super (NonUniformImage , self ).set_cmap (self , cmap )
855+ super (NonUniformImage , self ).set_cmap (cmap )
856856
857857
858858class PcolorImage (martist .Artist , cm .ScalarMappable ):
Original file line number Diff line number Diff line change 66import numpy as np
77
88from matplotlib .testing .decorators import image_comparison , knownfailureif , cleanup
9- from matplotlib .image import BboxImage , imread
9+ from matplotlib .image import BboxImage , imread , NonUniformImage
1010from matplotlib .transforms import Bbox
1111from matplotlib import rcParams
1212import matplotlib .pyplot as plt
@@ -441,6 +441,18 @@ def test_zoom_and_clip_upper_origin():
441441 ax .set_xlim (- 0.5 , 2.0 )
442442
443443
444+ @cleanup
445+ def test_nonuniformimage_setcmap ():
446+ ax = plt .gca ()
447+ im = NonUniformImage (ax )
448+ im .set_cmap ('Blues' )
449+
450+ @cleanup
451+ def test_nonuniformimage_setnorm ():
452+ ax = plt .gca ()
453+ im = NonUniformImage (ax )
454+ im .set_norm (plt .Normalize ())
455+
444456if __name__ == '__main__' :
445457 import nose
446458 nose .runmodule (argv = ['-s' ,'--with-doctest' ], exit = False )
You can’t perform that action at this time.
0 commit comments