8000 DOC/API: put the top-level helpers back · matplotlib/mpl-gui@7d017c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7d017c9

Browse files
committed
DOC/API: put the top-level helpers back
1 parent 7f5a885 commit 7d017c9

File tree

2 files changed

+53
-28
lines changed

2 files changed

+53
-28
lines changed

docs/source/api.rst

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,54 @@ Select the backend
1010
------------------
1111
.. autosummary::
1212
:toctree: _as_gen
13-
:nosignatures:
13+
1414

1515
mpl_gui.select_gui_toolkit
1616

1717

18-
Display
19-
-------
18+
Interactivity
19+
-------------
2020

2121
.. autosummary::
2222
:toctree: _as_gen
23-
:nosignatures:
2423

2524

26-
mpl_gui.display
25+
mpl_gui.ion
26+
mpl_gui.ioff
27+
mpl_gui.is_interactive
2728

2829

29-
Interactivity
30-
-------------
30+
Unmanaged Figures
31+
-----------------
32+
33+
Figure Creation
34+
+++++++++++++++
35+
36+
These are not strictly necessary as they are only thin wrappers around creating
37+
a `matplotlib.figure.Figure` instance and creating children in one line.
3138

3239
.. autosummary::
3340
:toctree: _as_gen
34-
:nosignatures:
3541

36-
mpl_gui.ion
37-
mpl_gui.ioff
38-
mpl_gui.is_interactive
42+
43+
44+
mpl_gui.figure
45+
mpl_gui.subplots
46+
mpl_gui.subplot_mosaic
47+
48+
49+
50+
Display
51+
+++++++
52+
53+
.. autosummary::
54+
:toctree: _as_gen
55+
56+
57+
58+
mpl_gui.display
59+
mpl_gui.demote_figure
60+
3961

4062

4163
Locally Managed Figures
@@ -56,7 +78,7 @@ Create Figures and Axes
5678

5779
.. autosummary::
5880
:toctree: _as_gen
59-
:nosignatures:
81+
6082

6183
mpl_gui.FigureRegistry.figure
6284
mpl_gui.FigureRegistry.subplots
@@ -68,7 +90,7 @@ Access managed figures
6890

6991
.. autosummary::
7092
:toctree: _as_gen
71-
:nosignatures:
93+
7294

7395
mpl_gui.FigureRegistry.by_label
7496
mpl_gui.FigureRegistry.by_number
@@ -82,7 +104,7 @@ Show and close managed Figures
82104

83105
.. autosummary::
84106
:toctree: _as_gen
85-
:nosignatures:
107+
86108

87109
mpl_gui.FigureRegistry.show_all
88110
mpl_gui.FigureRegistry.close_all
@@ -106,7 +128,7 @@ Create Figures and Axes
106128

107129
.. autosummary::
108130
:toctree: _as_gen
109-
:nosignatures:
131+
110132

111133
mpl_gui.global_figures.figure
112134
mpl_gui.global_figures.subplots
@@ -119,7 +141,7 @@ Access managed figures
119141

120142
.. autosummary::
121143
:toctree: _as_gen
122-
:nosignatures:
144+
123145

124146
mpl_gui.global_figures.by_label
125147

@@ -130,7 +152,7 @@ Show and close managed Figures
130152

131153
.. autosummary::
132154
:toctree: _as_gen
133-
:nosignatures:
155+
134156

135157

136158

@@ -145,7 +167,7 @@ Interactivity
145167

146168
.. autosummary::
147169
:toctree: _as_gen
148-
:nosignatures:
170+
149171

150172

151173
mpl_gui.global_figures.ion

mpl_gui/__init__.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@
2929
)
3030
from ._manage_backend import select_gui_toolkit as select_gui_toolkit # noqa: F401
3131
from ._manage_backend import current_backend_module as _cbm
32-
from ._promotion import promote_figure as _promote_figure
32+
from ._promotion import (
33+
promote_figure as _promote_figure,
34+
demote_figure as demote_figure,
35+
)
3336
from ._creation import (
34-
figure as _figure,
35-
subplots as _subplots,
36-
subplot_mosaic as _subplot_mosaic,
37+
figure as figure,
38+
subplots as subplots,
39+
subplot_mosaic as subplot_mosaic,
3740
)
3841

3942

@@ -195,19 +198,19 @@ def by_number(self):
195198
self._ensure_all_figures_promoted()
196199
return {fig.canvas.manager.num: fig for fig in self.figures}
197200

198-
@functools.wraps(_figure)
201+
@functools.wraps(figure)
199202
def figure(self, *args, **kwargs):
200-
fig = _figure(*args, **kwargs)
203+
fig = figure(*args, **kwargs)
201204
return self._register_fig(fig)
202205

203-
@functools.wraps(_subplots)
206+
@functools.wraps(subplots)
204207
def subplots(self, *args, **kwargs):
205-
fig, axs = _subplots(*args, **kwargs)
208+
fig, axs = subplots(*args, **kwargs)
206209
return self._register_fig(fig), axs
207210

208-
@functools.wraps(_subplot_mosaic)
211+
@functools.wraps(subplot_mosaic)
209212
def subplot_mosaic(self, *args, **kwargs):
210-
fig, axd = _subplot_mosaic(*args, **kwargs)
213+
fig, axd = subplot_mosaic(*args, **kwargs)
211214
return self._register_fig(fig), axd
212215

213216
def _ensure_all_figures_promoted(self):

0 commit comments

Comments
 (0)
0