25
25
# the image namespace:
26
26
from matplotlib ._image import *
27
27
28
- from matplotlib .transforms import BboxBase , Bbox
28
+ from matplotlib .transforms import BboxBase , Bbox , IdentityTransform
29
29
import matplotlib .transforms as mtransforms
30
30
31
31
@@ -270,8 +270,8 @@ def _draw_unsampled_image(self, renderer, gc):
270
270
# firs, convert the image extent to the ic
271
271
x_llc , x_trc , y_llc , y_trc = self .get_extent ()
272
272
273
- xy = trans .transform_non_affine (np .array ([(x_llc , y_llc ),
274
- (x_trc , y_trc )]))
273
+ xy = trans .transform (np .array ([(x_llc , y_llc ),
274
+ (x_trc , y_trc )]))
275
275
276
276
_xx1 , _yy1 = xy [0 ]
277
277
_xx2 , _yy2 = xy [1 ]
@@ -283,15 +283,16 @@ def _draw_unsampled_image(self, renderer, gc):
283
283
if self ._image_skew_coordinate :
284
284
# skew the image when required.
285
285
x_lrc , y_lrc = self ._image_skew_coordinate
286
- xy2 = trans .transform_non_affine (np .array ([(x_lrc , y_lrc )]))
286
+ xy2 = trans .transform (np .array ([(x_lrc , y_lrc )]))
287
287
_xx3 , _yy3 = xy2 [0 ]
288
288
289
289
tr_rotate_skew = self ._get_rotate_and_skew_transform (_xx1 , _yy1 ,
290
290
_xx2 , _yy2 ,
291
291
_xx3 , _yy3 )
292
- trans_ic_to_canvas = tr_rotate_skew + trans . get_affine ()
292
+ trans_ic_to_canvas = tr_rotate_skew
293
293
else :
294
- trans_ic_to_canvas = trans .get_affine ()
294
+ trans_ic_to_canvas = IdentityTransform ()
295
+
295
296
296
297
# Now, viewLim in the ic. It can be rotated and can be
297
298
# skewed. Make it big enough.
0 commit comments