Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5241b2f

Browse files
committed
first pass at sphinx gallery for pyplot
1 parent 4b57759 commit 5241b2f

File tree

10 files changed

+139
-17
lines changed

10 files changed

+139
-17
lines changed

doc/_templates/autofunctions.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{ fullname | escape | underline }}
2+
3+
4+
.. automodule:: {{ fullname }}
5+
6+
{% block functions %}
7+
{% if functions %}
8+
9+
Functions
10+
---------
11+
12+
.. autosummary::
13+
:template: autosummary.rst
14+
:toctree:
15+
16+
{% for item in functions %}
17+
{{ item }}
18+
{% endfor %}
19+
{% endif %}
20+
{% endblock %}

doc/_templates/automodule.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{ fullname | escape | underline}}
2+
3+
4+
.. automodule:: {{ fullname }}
5+
6+
{% block functions %}
7+
{% if functions %}
8+
9+
Functions
10+
---------
11+
12+
.. autosummary::
13+
:template: autosummary.rst
14+
:toctree:
15+
16+
{% for item in functions %}
17+
{{ item }}
18+
{% endfor %}
19+
{% endif %}
20+
{% endblock %}
21+
22+
{% block classes %}
23+
{% if classes %}
24+
25+
Classes
26+
-------
27+
28+
.. autosummary::
29+
:template: autosummary.rst
30+
:toctree:
31+
32+
{% for item in classes %}
33+
{{ item }}
34+
{% endfor %}
35+
{% endif %}
36+
{% endblock %}
37+
38+
{% block exceptions %}
39+
{% if exceptions %}
40+
41+
Exceptions
42+
----------
43+
44+
.. autosummary::
45+
{% for item in exceptions %}
46+
{{ item }}
47+
{%- endfor %}
48+
{% endif %}
49+
{% endblock %}

doc/_templates/autosummary.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ fullname | escape | underline}}
2+
3+
4+
.. currentmodule:: {{ module }}
5+
6+
.. auto{{ objtype }}:: {{ objname }}
7+
8+
{% if objtype in ['class', 'method', 'function'] %}
9+
10+
.. include:: {{module}}.{{objname}}.examples
11+
12+
.. raw:: html
13+
14+
<div class="clearer"></div>
15+
16+
{% endif %}

doc/_templates/function.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:mod:`{{module}}`.{{objname}}
2+
{{ underline }}====================
3+
4+
.. currentmodule:: {{ module }}
5+
6+
.. autofunction:: {{ objname }}
7+
8+
.. include:: {{module}}.{{objname}}.examples
9+
10+
.. raw:: html
11+
12+
<div class="clearer"></div>

doc/_templates/layout.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ <h3>{{ _('Navigation') }}</h3>
189189
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
190190

191191
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
192-
193192
<div class="document">
194193
{%- block document %}
195194
<div class="documentwrapper">

doc/api/axes_api.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Basic
1919

2020
.. autosummary::
2121
:toctree: _as_gen
22+
:template: autosummary.rst
2223
:nosignatures:
2324

2425
Axes.plot
@@ -56,6 +57,7 @@ Spans
5657

5758
.. autosummary::
5859
:toctree: _as_gen
60+
:template: autosummary.rst
5961
:nosignatures:
6062

6163
Axes.axhline
@@ -68,6 +70,7 @@ Spectral
6870

6971
.. autosummary::
7072
:toctree: _as_gen
73+
:template: autosummary.rst
7174
:nosignatures:
7275

7376
Axes.acorr
@@ -85,6 +88,7 @@ Statistics
8588

8689
.. autosummary::
8790
:toctree: _as_gen
91+
:template: autosummary.rst
8892
:nosignatures:
8993

9094
Axes.boxplot
@@ -98,6 +102,7 @@ Binned
98102

99103
.. autosummary::
100104
:toctree: _as_gen
105+
:template: autosummary.rst
101106
:nosignatures:
102107

103108
Axes.hexbin
@@ -109,6 +114,7 @@ Contours
109114

110115
.. autosummary::
111116
:toctree: _as_gen
117+
:template: autosummary.rst
112118
:nosignatures:
113119

114120
Axes.clabel
@@ -120,6 +126,7 @@ Array
120126

121127
.. autosummary::
122128
:toctree: _as_gen
129+
:template: autosummary.rst
123130
:nosignatures:
124131

125132
Axes.imshow
@@ -134,6 +141,7 @@ Unstructured Triangles
134141

135142
.. autosummary::
136143
:toctree: _as_gen
144+
:template: autosummary.rst
137145
:nosignatures:
138146

139147
Axes.tripcolor
@@ -147,6 +155,7 @@ Text and Annotations
147155

148156
.. autosummary::
149157
:toctree: _as_gen
158+
:template: autosummary.rst
150159
:nosignatures:
151160

152161
Axes.annotate
@@ -160,6 +169,7 @@ Fields
160169

161170
.. autosummary::
162171
:toctree: _as_gen
172+
:template: autosummary.rst
163173
:nosignatures:
164174

165175
Axes.barbs
@@ -173,6 +183,7 @@ Clearing
173183

174184
.. autosummary::
175185
:toctree: _as_gen
186+
:template: autosummary.rst
176187
:nosignatures:
177188

178189
Axes.cla
@@ -185,6 +196,7 @@ Appearance
185196

186197
.. autosummary::
187198
:toctree: _as_gen
199+
:template: autosummary.rst
188200
:nosignatures:
189201

190202

@@ -215,6 +227,7 @@ Property cycle
215227

216228
.. autosummary::
217229
:toctree: _as_gen
230+
:template: autosummary.rst
218231
:nosignatures:
219232

220233
Axes.set_prop_cycle
@@ -226,6 +239,7 @@ Axis / limits
226239

227240
.. autosummary::
228241
:toctree: _as_gen
242+
:template: autosummary.rst
229243
:nosignatures:
230244

231245

@@ -239,6 +253,7 @@ Axis Limits and direction
239253

240254
.. autosummary::
241255
:toctree: _as_gen
256+
:template: autosummary.rst
242257
:nosignatures:
243258

244259
Axes.invert_xaxis
@@ -265,6 +280,7 @@ Axis Labels, title, and legend
265280

266281
.. autosummary::
267282
:toctree: _as_gen
283+
:template: autosummary.rst
268284
:nosignatures:
269285

270286
Axes.get_xlabel
@@ -285,6 +301,7 @@ Axis scales
285301

286302
.. autosummary::
287303
:toctree: _as_gen
304+
:template: autosummary.rst
288305
:nosignatures:
289306

290307
Axes.set_xscale
@@ -300,6 +317,7 @@ Autoscaling and margins
300317

301318
.. autosummary::
302319
:toctree: _as_gen
320+
:template: autosummary.rst
303321
:nosignatures:
304322

305323
Axes.use_sticky_edges
@@ -328,6 +346,7 @@ Aspect ratio
328346

329347
.. autosummary::
330348
:toctree: _as_gen
349+
:template: autosummary.rst
331350
:nosignatures:
332351

333352
Axes.apply_aspect
@@ -344,6 +363,7 @@ Ticks and tick labels
344363

345364
.. autosummary::
346365
:toctree: _as_gen
366+
:template: autosummary.rst
347367
:nosignatures:
348368

349369
Axes.xaxis_date
@@ -385,6 +405,7 @@ Units
385405

386406
.. autosummary::
387407
:toctree: _as_gen
408+
:template: autosummary.rst
388409
:nosignatures:
389410

390411
Axes.convert_xunits
@@ -397,6 +418,7 @@ Adding Artists
397418

398419
.. autosummary::
399420
:toctree: _as_gen
421+
:template: autosummary.rst
400422
:nosignatures:
401423

402424
Axes.add_artist
@@ -413,6 +435,7 @@ Twinning
413435

414436
.. autosummary::
415437
:toctree: _as_gen
438+
:template: autosummary.rst
416439
:nosignatures:
417440

418441
Axes.twinx
@@ -426,6 +449,7 @@ Axes Position
426449
=============
427450
.. autosummary::
428451
:toctree: _as_gen
452+
:template: autosummary.rst
429453
:nosignatures:
430454

431455
Axes.get_anchor
@@ -445,6 +469,7 @@ Async/Event based
445469

446470
.. autosummary::
447471
:toctree: _as_gen
472+
:template: autosummary.rst
448473
:nosignatures:
449474

450475
Axes.stale
@@ -458,6 +483,7 @@ Interactive
458483

459484
.. autosummary::
460485
:toctree: _as_gen
486+
:template: autosummary.rst
461487
:nosignatures:
462488

463489

@@ -502,6 +528,7 @@ Children
502528

503529
.. autosummary::
504530
:toctree: _as_gen
531+
:template: autosummary.rst
505532
:nosignatures:
506533

507534
Axes.get_children
@@ -515,6 +542,7 @@ Drawing
515542

516543
.. autosummary::
517544
:toctree: _as_gen
545+
:template: autosummary.rst
518546
:nosignatures:
519547

520548
Axes.draw
@@ -534,6 +562,7 @@ Bulk property manipulation
534562

535563
.. autosummary::
536564
:toctree: _as_gen
565+
:template: autosummary.rst
537566
:nosignatures:
538567

539568
Axes.set
@@ -547,6 +576,7 @@ General Artist Properties
547576

548577
.. autosummary::
549578
:toctree: _as_gen
579+
:template: autosummary.rst
550580
:nosignatures:
551581

552582
Axes.set_alpha
@@ -595,6 +625,7 @@ Artist Methods
595625

596626
.. autosummary::
597627
:toctree: _as_gen
628+
:template: autosummary.rst
598629
:nosignatures:
599630

600631
Axes.is_figure_set
@@ -610,6 +641,7 @@ non-rectilinear Axes.
610641

611642
.. autosummary::
612643
:toctree: _as_gen
644+
:template: autosummary.rst
613645
:nosignatures:
614646

615647
Axes.name
@@ -629,6 +661,7 @@ Other
629661

630662
.. autosummary::
631663
:toctree: _as_gen
664+
:template: autosummary.rst
632665
:nosignatures:
633666

634667
Axes.zorder

doc/api/index.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
path_api.rst
4545
patheffects_api.rst
4646
projections_api.rst
47-
pyplot_api.rst
4847
rcsetup_api.rst
4948
sankey_api.rst
5049
scale_api.rst
@@ -58,3 +57,11 @@
5857
type1font.rst
5958
units_api.rst
6059
widgets_api.rst
60+
61+
.. currentmodule:: matplotlib
62+
63+
.. autosummary::
64+
:toctree: _as_gen
65+
:template: autofunctions.rst
66+
67+
pyplot

0 commit comments

Comments
 (0)