Skip to content

Commit ce1da9e

Browse files
committed
Improve name and doc of base widget
1 parent 95c813a commit ce1da9e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: src/napari_matplotlib/base.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@
1717
# Icons modified from
1818
# https://github.com/matplotlib/matplotlib/tree/main/lib/matplotlib/mpl-data/images
1919
ICON_ROOT = Path(__file__).parent / "icons"
20-
__all__ = ["MPLWidget", "NapariMPLWidget"]
20+
__all__ = ["BaseNapariMPLWidget", "NapariMPLWidget"]
2121

2222

23-
class MPLWidget(QWidget):
23+
class BaseNapariMPLWidget(QWidget):
2424
"""
25-
Widget containing a Matplotlib canvas and toolbar.
25+
Widget containing Matplotlib canvas and toolbar themed to match napari.
2626
2727
This creates a single FigureCanvas, which contains a single
28-
`~matplotlib.figure.Figure`, and an associated toolbar.
28+
`~matplotlib.figure.Figure`, and an associated toolbar. Both of these
29+
are customised to match the visual style of the main napari window.
2930
It is not responsible for creating any Axes, because different
3031
widgets may want to implement different subplot layouts.
3132
"""
@@ -99,7 +100,7 @@ def _replace_toolbar_icons(self) -> None:
99100
action.setIcon(QIcon(icon_path))
100101

101102

102-
class NapariMPLWidget(MPLWidget):
103+
class NapariMPLWidget(BaseNapariMPLWidget):
103104
"""
104105
Widget containing a Matplotlib canvas and toolbar.
105106

0 commit comments

Comments
 (0)