|
11 | 11 | import matplotlib.patches as mpatches |
12 | 12 | import matplotlib.lines as mlines |
13 | 13 | import matplotlib.path as mpath |
14 | | -import matplotlib.transforms as mtrans |
| 14 | +import matplotlib.transforms as mtransforms |
15 | 15 | import matplotlib.collections as mcollections |
16 | 16 | import matplotlib.artist as martist |
17 | 17 | from matplotlib.testing.decorators import image_comparison |
@@ -39,13 +39,13 @@ def test_patch_transform_of_none(): |
39 | 39 | transform=None, alpha=0.5) |
40 | 40 | assert e.is_transform_set() is True |
41 | 41 | ax.add_patch(e) |
42 | | - assert isinstance(e._transform, mtrans.IdentityTransform) |
| 42 | + assert isinstance(e._transform, mtransforms.IdentityTransform) |
43 | 43 |
|
44 | 44 | # Providing an IdentityTransform puts the ellipse in device coordinates. |
45 | 45 | e = mpatches.Ellipse(xy_pix, width=100, height=100, |
46 | | - transform=mtrans.IdentityTransform(), alpha=0.5) |
| 46 | + transform=mtransforms.IdentityTransform(), alpha=0.5) |
47 | 47 | ax.add_patch(e) |
48 | | - assert isinstance(e._transform, mtrans.IdentityTransform) |
| 48 | + assert isinstance(e._transform, mtransforms.IdentityTransform) |
49 | 49 |
|
50 | 50 | # Not providing a transform, and then subsequently "get_transform" should |
51 | 51 | # not mean that "is_transform_set". |
@@ -84,14 +84,14 @@ def test_collection_transform_of_none(): |
84 | 84 | alpha=0.5) |
85 | 85 | c.set_transform(None) |
86 | 86 | ax.add_collection(c) |
87 | | - assert isinstance(c.get_transform(), mtrans.IdentityTransform) |
| 87 | + assert isinstance(c.get_transform(), mtransforms.IdentityTransform) |
88 | 88 |
|
89 | 89 | # providing an IdentityTransform puts the ellipse in device coordinates |
90 | 90 | e = mpatches.Ellipse(xy_pix, width=100, height=100) |
91 | | - c = mcollections.PatchCollection([e], transform=mtrans.IdentityTransform(), |
| 91 | + c = mcollections.PatchCollection([e], transform=mtransforms.IdentityTransform(), |
92 | 92 | alpha=0.5) |
93 | 93 | ax.add_collection(c) |
94 | | - assert isinstance(c._transOffset, mtrans.IdentityTransform) |
| 94 | + assert isinstance(c._transOffset, mtransforms.IdentityTransform) |
95 | 95 |
|
96 | 96 |
|
97 | 97 | @image_comparison(baseline_images=["clip_path_clipping"], remove_text=True) |
|
0 commit comments