File tree 2 files changed +14
-2
lines changed 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -852,8 +852,8 @@ def make_image(self, magnification=1.0):
852
852
l , b , r , t = self .axes .bbox .extents
853
853
width = (round (r ) + 0.5 ) - (round (l ) - 0.5 )
854
854
height = (round (t ) + 0.5 ) - (round (b ) - 0.5 )
855
- width = width * magnification
856
- height = height * magnification
855
+ width = int ( width * magnification )
856
+ height = int ( height * magnification )
857
857
if self ._rgbacache is None :
858
858
A = self .to_rgba (self ._A , bytes = True )
859
859
self ._rgbacache = A
Original file line number Diff line number Diff line change @@ -3565,6 +3565,18 @@ def test_move_offsetlabel():
3565
3565
ax .yaxis .tick_right ()
3566
3566
assert_equal ((1 , 0.5 ), ax .yaxis .offsetText .get_position ())
3567
3567
3568
+
3569
+ @cleanup
3570
+ def test_pcolor_fast_non_uniform ():
3571
+ Z = np .arange (6 ).reshape ((3 , 2 ))
3572
+ X = np .array ([0 , 1 , 2 , 10 ])
3573
+ Y = np .array ([0 , 1 , 2 ])
3574
+
3575
+ plt .figure ()
3576
+ ax = plt .subplot (111 )
3577
+ ax .pcolorfast (X , Y , Z .T ) # <-- fails
3578
+
3579
+
3568
3580
if __name__ == '__main__' :
3569
3581
import nose
3570
3582
import sys
You can’t perform that action at this time.
0 commit comments