Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/api/next_api_changes/deprecations/26295-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
``inset_location.InsetPosition`` is deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use `~.Axes.inset_axes` instead.
1 change: 1 addition & 0 deletions lib/mpl_toolkits/axes_grid1/inset_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from .parasite_axes import HostAxes


@_api.deprecated("3.8", alternative="Axes.inset_axes")
class InsetPosition:
@_docstring.dedent_interpd
def __init__(self, parent, lbwh):
Expand Down
3 changes: 2 additions & 1 deletion lib/mpl_toolkits/axes_grid1/tests/test_axes_grid1.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,8 @@ def test_rgb_axes():
def test_insetposition():
fig, ax = plt.subplots(figsize=(2, 2))
ax_ins = plt.axes([0, 0, 1, 1])
ip = InsetPosition(ax, [0.2, 0.25, 0.5, 0.4])
with pytest.warns(mpl.MatplotlibDeprecationWarning):
ip = InsetPosition(ax, [0.2, 0.25, 0.5, 0.4])
ax_ins.set_axes_locator(ip)


Expand Down