|
21 | 21 | Divider, HBoxDivider, make_axes_area_auto_adjustable) |
22 | 22 | from mpl_toolkits.axes_grid1.axes_rgb import RGBAxes |
23 | 23 | from mpl_toolkits.axes_grid1.inset_locator import ( |
24 | | - zoomed_inset_axes, mark_inset, inset_axes, BboxConnectorPatch) |
| 24 | + zoomed_inset_axes, mark_inset, inset_axes, BboxConnectorPatch, |
| 25 | + InsetPosition) |
25 | 26 | import mpl_toolkits.axes_grid1.mpl_axes |
26 | 27 |
|
27 | 28 | import pytest |
@@ -571,6 +572,14 @@ def test_rgb_axes(): |
571 | 572 | ax.imshow_rgb(r, g, b, interpolation='none') |
572 | 573 |
|
573 | 574 |
|
| 575 | +@image_comparison(['insetposition.png'], remove_text=True) |
| 576 | +def test_insetposition(): |
| 577 | + fig, ax = plt.subplots(figsize=(2, 2)) |
| 578 | + ax_ins = plt.axes([0, 0, 1, 1]) |
| 579 | + ip = InsetPosition(ax, [0.2, 0.25, 0.5, 0.4]) |
| 580 | + ax_ins.set_axes_locator(ip) |
| 581 | + |
| 582 | + |
574 | 583 | # The original version of this test relied on mpl_toolkits's slightly different |
575 | 584 | # colorbar implementation; moving to matplotlib's own colorbar implementation |
576 | 585 | # caused the small image comparison error. |
|
0 commit comments