Skip to content
Open
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
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_bases.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ class NavigationToolbar2:
def release_zoom(self, event: Event) -> None: ...
def push_current(self) -> None: ...
subplot_tool: widgets.SubplotTool
def configure_subplots(self, *args: Any) -> widgets.SubplotTool: ...
def configure_subplots(self, *args: Any) -> object: ...
def save_figure(self, *args) -> str | None | object: ...
def update(self) -> None: ...
def set_history_buttons(self) -> None: ...
Expand Down
8 changes: 5 additions & 3 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@
ResizeEventType,
LogLevel
)
from matplotlib.widgets import SubplotTool
from matplotlib._api import _Unset


Expand Down Expand Up @@ -2152,13 +2151,16 @@ def twiny(ax: matplotlib.axes.Axes | None = None) -> _AxesBase:
return ax1


def subplot_tool(targetfig: Figure | None = None) -> SubplotTool | None:
def subplot_tool(targetfig: Figure | None = None) -> object | None:
"""
Launch a subplot tool window for a figure.

Returns
-------
`matplotlib.widgets.SubplotTool`
object or None
The subplot tool window: a `~matplotlib.widgets.SubplotTool` for the
widgets backend, an implementation-specific value for other backends
(e.g. a Qt dialog), or `None` for backends using the toolmanager.
"""
if targetfig is None:
targetfig = gcf()
Expand Down
Loading