|
24 | 24 | # For user convenience, the names from _image are also imported into
|
25 | 25 | # the image namespace:
|
26 | 26 | from matplotlib._image import *
|
27 |
| -from matplotlib.transforms import (Affine2D, BboxBase, Bbox, BboxTransform, |
28 |
| - IdentityTransform, TransformedBbox) |
| 27 | +from matplotlib.transforms import ( |
| 28 | + Affine2D, BboxBase, Bbox, BboxTransform, BboxTransformTo, |
| 29 | + IdentityTransform, TransformedBbox) |
29 | 30 |
|
30 | 31 | _log = logging.getLogger(__name__)
|
31 | 32 |
|
@@ -1377,12 +1378,7 @@ def __init__(self, bbox,
|
1377 | 1378 | resample=resample,
|
1378 | 1379 | **kwargs
|
1379 | 1380 | )
|
1380 |
| - |
1381 | 1381 | self.bbox = bbox
|
1382 |
| - self._transform = IdentityTransform() |
1383 |
| - |
1384 |
| - def get_transform(self): |
1385 |
| - return self._transform |
1386 | 1382 |
|
1387 | 1383 | def get_window_extent(self, renderer=None):
|
1388 | 1384 | if renderer is None:
|
@@ -1416,7 +1412,7 @@ def make_image(self, renderer, magnification=1.0, unsampled=False):
|
1416 | 1412 | bbox_in._points /= [width, height]
|
1417 | 1413 | bbox_out = self.get_window_extent(renderer)
|
1418 | 1414 | clip = Bbox([[0, 0], [width, height]])
|
1419 |
| - self._transform = BboxTransform(Bbox([[0, 0], [1, 1]]), clip) |
| 1415 | + self._transform = BboxTransformTo(clip) |
1420 | 1416 | return self._make_image(
|
1421 | 1417 | self._A,
|
1422 | 1418 | bbox_in, bbox_out, clip, magnification, unsampled=unsampled)
|
|
0 commit comments