File tree 2 files changed +15
-3
lines changed 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -847,12 +847,12 @@ def set_filterrad(self, s):
847
847
def set_norm (self , norm ):
848
848
if self ._A is not None :
849
849
raise RuntimeError ('Cannot change colors after loading data' )
850
- super (NonUniformImage , self ).set_norm (self , norm )
850
+ super (NonUniformImage , self ).set_norm (norm )
851
851
852
852
def set_cmap (self , cmap ):
853
853
if self ._A is not None :
854
854
raise RuntimeError ('Cannot change colors after loading data' )
855
- super (NonUniformImage , self ).set_cmap (self , cmap )
855
+ super (NonUniformImage , self ).set_cmap (cmap )
856
856
857
857
858
858
class PcolorImage (martist .Artist , cm .ScalarMappable ):
Original file line number Diff line number Diff line change 6
6
import numpy as np
7
7
8
8
from matplotlib .testing .decorators import image_comparison , knownfailureif , cleanup
9
- from matplotlib .image import BboxImage , imread
9
+ from matplotlib .image import BboxImage , imread , NonUniformImage
10
10
from matplotlib .transforms import Bbox
11
11
from matplotlib import rcParams
12
12
import matplotlib .pyplot as plt
@@ -441,6 +441,18 @@ def test_zoom_and_clip_upper_origin():
441
441
ax .set_xlim (- 0.5 , 2.0 )
442
442
443
443
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
+
444
456
if __name__ == '__main__' :
445
457
import nose
446
458
nose .runmodule (argv = ['-s' ,'--with-doctest' ], exit = False )
You can’t perform that action at this time.
0 commit comments