File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -853,8 +853,9 @@ def make_image(self, magnification=1.0):
853853 l , b , r , t = self .axes .bbox .extents
854854 width = (round (r ) + 0.5 ) - (round (l ) - 0.5 )
855855 height = (round (t ) + 0.5 ) - (round (b ) - 0.5 )
856- width = width * magnification
857- height = height * magnification
856+ # The extra cast-to-int is only needed for python2
857+ width = int (round (width * magnification ))
858+ height = int (round (height * magnification ))
858859 if self ._rgbacache is None :
859860 A = self .to_rgba (self ._A , bytes = True )
860861 self ._rgbacache = A
Original file line number Diff line number Diff line change @@ -3675,6 +3675,17 @@ def test_no_None():
36753675 assert_raises (ValueError , plt .plot , None , None )
36763676
36773677
3678+ @cleanup
3679+ def test_pcolor_fast_non_uniform ():
3680+ Z = np .arange (6 ).reshape ((3 , 2 ))
3681+ X = np .array ([0 , 1 , 2 , 10 ])
3682+ Y = np .array ([0 , 1 , 2 ])
3683+
3684+ plt .figure ()
3685+ ax = plt .subplot (111 )
3686+ ax .pcolorfast (X , Y , Z .T )
3687+
3688+
36783689if __name__ == '__main__' :
36793690 import nose
36803691 import sys
You can’t perform that action at this time.
0 commit comments