Skip to content

Improve name and doc of base widget #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2023
Merged
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
11 changes: 6 additions & 5 deletions src/napari_matplotlib/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
# Icons modified from
# https://github.com/matplotlib/matplotlib/tree/main/lib/matplotlib/mpl-data/images
ICON_ROOT = Path(__file__).parent / "icons"
__all__ = ["MPLWidget", "NapariMPLWidget"]
__all__ = ["BaseNapariMPLWidget", "NapariMPLWidget"]


class MPLWidget(QWidget):
class BaseNapariMPLWidget(QWidget):
"""
Widget containing a Matplotlib canvas and toolbar.
Widget containing Matplotlib canvas and toolbar themed to match napari.

This creates a single FigureCanvas, which contains a single
`~matplotlib.figure.Figure`, and an associated toolbar.
`~matplotlib.figure.Figure`, and an associated toolbar. Both of these
are customised to match the visual style of the main napari window.
It is not responsible for creating any Axes, because different
widgets may want to implement different subplot layouts.
"""
Expand Down Expand Up @@ -99,7 +100,7 @@ def _replace_toolbar_icons(self) -> None:
action.setIcon(QIcon(icon_path))


class NapariMPLWidget(MPLWidget):
class NapariMPLWidget(BaseNapariMPLWidget):
"""
Widget containing a Matplotlib canvas and toolbar.

Expand Down