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

Skip to content

Commit 8149536

Browse files
authored
Merge pull request #8525 from choldgraf/add_auto_examples
Sphinx Gallery API pages + deprecating old examples folder
2 parents 4d9738f + 5cc5783 commit 8149536

File tree

173 files changed

+1900
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+1900
-485
lines changed

doc/_static/mpl.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,4 +786,18 @@ div.responsive_subfig img {
786786
width: 50%; /* we want 2 subfigs in a row */
787787
}
788788

789+
/* Sphinx gallery display */
790+
}
791+
792+
div.align-center {
793+
margin: auto;
794+
text-align: center;
795+
}
796+
797+
p.caption {
798+
font-weight: bold;
799+
}
800+
801+
div#gallery.section {
802+
overflow: hidden;
789803
}

doc/_templates/autofunctions.rst

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

doc/_templates/automodule.rst

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ Examples
139139
.. toctree::
140140
:maxdepth: 1
141141

142-
../examples/animation/animate_decay
143-
../examples/animation/bayes_update
144-
../examples/animation/double_pendulum_animated
145-
../examples/animation/dynamic_image
146-
../examples/animation/histogram
147-
../examples/animation/rain
148-
../examples/animation/random_data
149-
../examples/animation/simple_3danim
150-
../examples/animation/simple_anim
151-
../examples/animation/strip_chart_demo
152-
../examples/animation/unchained
142+
../gallery/animation/animate_decay
143+
../gallery/animation/bayes_update_sgskip
144+
../gallery/animation/double_pendulum_animated_sgskip
145+
../gallery/animation/dynamic_image
146+
../gallery/animation/histogram
147+
../gallery/animation/rain
148+
../gallery/animation/random_data
149+
../gallery/animation/simple_3danim
150+
../gallery/animation/simple_anim
151+
../gallery/animation/strip_chart_demo
152+
../gallery/animation/unchained
153153

154154
``ArtistAnimation``
155155
-------------------
@@ -161,9 +161,9 @@ Examples
161161
.. toctree::
162162
:maxdepth: 1
163163

164-
../examples/animation/basic_example
165-
../examples/animation/basic_example_writer_sgskip
166-
../examples/animation/dynamic_image2
164+
../gallery/animation/basic_example
165+
../gallery/animation/basic_example_writer_sgskip
166+
../gallery/animation/dynamic_image2
167167

168168

169169

0 commit comments

Comments
 (0)