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):
853
853
l , b , r , t = self .axes .bbox .extents
854
854
width = (round (r ) + 0.5 ) - (round (l ) - 0.5 )
855
855
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 ))
858
859
if self ._rgbacache is None :
859
860
A = self .to_rgba (self ._A , bytes = True )
860
861
self ._rgbacache = A
Original file line number Diff line number Diff line change @@ -3675,6 +3675,17 @@ def test_no_None():
3675
3675
assert_raises (ValueError , plt .plot , None , None )
3676
3676
3677
3677
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
+
3678
3689
if __name__ == '__main__' :
3679
3690
import nose
3680
3691
import sys
You can’t perform that action at this time.
0 commit comments