Skip to content

Commit aec794a

Browse files
authored
Merge pull request #17 from tacaswell/doc/rewrite
Doc/rewrite (and code changes inspired by trying to document it)
2 parents ea24bdd + 374c2af commit aec794a

File tree

10 files changed

+287
-164
lines changed

10 files changed

+287
-164
lines changed

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
99
jobs:
1010
build:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Install Python dependencies

.github/workflows/testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ['3.7', '3.8', '3.9', '3.10']
15+
python-version: ['3.9', '3.10', '3.11', '3.12']
1616
fail-fast: false
1717
steps:
1818

docs/source/api.rst

+113-24
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,175 @@
1-
mpl gui
2-
=======
1+
mpl gui API Reference
2+
=====================
3+
4+
.. automodule:: mpl_gui
5+
:no-undoc-members:
36

4-
.. module:: mpl_gui
57

6-
Show
7-
----
88

9+
Select the backend
10+
------------------
911
.. autosummary::
1012
:toctree: _as_gen
11-
:nosignatures:
1213

13-
mpl_gui.show
14+
15+
mpl_gui.select_gui_toolkit
1416

1517

1618
Interactivity
1719
-------------
1820

1921
.. autosummary::
2022
:toctree: _as_gen
21-
:nosignatures:
23+
2224

2325
mpl_gui.ion
2426
mpl_gui.ioff
2527
mpl_gui.is_interactive
2628

2729

28-
Figure Fabrication
29-
------------------
30+
Unmanaged Figures
31+
-----------------
3032

31-
Un-managed
32-
++++++++++
33+
Figure Creation
34+
+++++++++++++++
3335

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.
3438

3539
.. autosummary::
3640
:toctree: _as_gen
37-
:nosignatures:
41+
42+
3843

3944
mpl_gui.figure
4045
mpl_gui.subplots
4146
mpl_gui.subplot_mosaic
4247

4348

49+
50+
Display
51+
+++++++
52+
4453
.. autosummary::
4554
:toctree: _as_gen
46-
:nosignatures:
4755

48-
mpl_gui.promote_figure
4956

50-
Managed
51-
+++++++
57+
58+
mpl_gui.display
59+
mpl_gui.demote_figure
60+
61+
62+
63+
Locally Managed Figures
64+
-----------------------
5265

5366

5467
.. autoclass:: mpl_gui.FigureRegistry
5568
:no-undoc-members:
5669
:show-inheritance:
5770

5871

72+
.. autoclass:: mpl_gui.FigureContext
73+
:no-undoc-members:
74+
:show-inheritance:
75+
76+
Create Figures and Axes
77+
+++++++++++++++++++++++
78+
5979
.. autosummary::
6080
:toctree: _as_gen
61-
:nosignatures:
81+
6282

6383
mpl_gui.FigureRegistry.figure
6484
mpl_gui.FigureRegistry.subplots
6585
mpl_gui.FigureRegistry.subplot_mosaic
86+
87+
88+
Access managed figures
89+
++++++++++++++++++++++
90+
91+
.. autosummary::
92+
:toctree: _as_gen
93+
94+
6695
mpl_gui.FigureRegistry.by_label
96+
mpl_gui.FigureRegistry.by_number
97+
mpl_gui.FigureRegistry.figures
98+
99+
100+
101+
Show and close managed Figures
102+
++++++++++++++++++++++++++++++
103+
104+
105+
.. autosummary::
106+
:toctree: _as_gen
107+
108+
67109
mpl_gui.FigureRegistry.show_all
68110
mpl_gui.FigureRegistry.close_all
111+
mpl_gui.FigureRegistry.show
112+
mpl_gui.FigureRegistry.close
69113

70114

71-
.. autoclass:: mpl_gui.FigureContext
115+
116+
117+
Globally managed
118+
----------------
119+
120+
121+
.. automodule:: mpl_gui.global_figures
72122
:no-undoc-members:
73-
:show-inheritance:
74123

75124

76125

126+
Create Figures and Axes
127+
+++++++++++++++++++++++
77128

129+
.. autosummary::
130+
:toctree: _as_gen
131+
132+
133+
mpl_gui.global_figures.figure
134+
mpl_gui.global_figures.subplots
135+
mpl_gui.global_figures.subplot_mosaic
136+
137+
138+
Access managed figures
139+
++++++++++++++++++++++
78140

79141

80-
Select the backend
81-
------------------
82142
.. autosummary::
83143
:toctree: _as_gen
84-
:nosignatures:
85144

86-
mpl_gui.select_gui_toolkit
145+
146+
mpl_gui.global_figures.by_label
147+
148+
149+
Show and close managed Figures
150+
++++++++++++++++++++++++++++++
151+
152+
153+
.. autosummary::
154+
:toctree: _as_gen
155+
156+
157+
158+
159+
mpl_gui.global_figures.show
160+
mpl_gui.global_figures.show_all
161+
mpl_gui.global_figures.close_all
162+
mpl_gui.global_figures.close
163+
164+
165+
Interactivity
166+
+++++++++++++
167+
168+
.. autosummary::
169+
:toctree: _as_gen
170+
171+
172+
173+
mpl_gui.global_figures.ion
174+
mpl_gui.global_figures.ioff
175+
mpl_gui.global_figures.is_interactive

docs/source/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
130130
"collapse_navigation": not is_release_build,
131131
"show_prev_next": False,
132+
"navigation_with_keys": False,
133+
# "secondary_sidebar_items": "page-toc.html",
134+
"footer_start": ["copyright", "sphinx-version", "doc_version"],
132135
}
133136
include_analytics = is_release_build
134137
if include_analytics:
@@ -153,9 +156,6 @@
153156
# This is required for the alabaster theme
154157
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
155158
html_sidebars = {
156-
"**": [
157-
"relations.html", # needs 'show_related': True theme option to display
158-
]
159159
}
160160

161161

0 commit comments

Comments
 (0)