8000 Merge pull request #8545 from choldgraf/add_tutorials · matplotlib/matplotlib@a9a8634 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9a8634

Browse files
authored
Merge pull request #8545 from choldgraf/add_tutorials
Add tutorials
2 parents 1ef4d39 + 4e93fe4 commit a9a8634

File tree

146 files changed

+5795
-5805
lines changed

Some content is hidden

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

146 files changed

+5795
-5805
lines changed

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
################
3131
# setup.py working directory
3232
build
33-
# sphinx build directory
34-
doc/_build
35-
doc/gallery
33+
3634
# setup.py dist directory
3735
dist
3836
# Egg metadata
@@ -58,9 +56,13 @@ lib/matplotlib/mpl-data/matplotlibrc
5856

5957
# Documentation generated files #
6058
#################################
59+
# sphinx build directory
60+
doc/_build
6161
doc/api/_as_gen
62-
doc/examples
6362
# autogenerated by sphinx-gallery
63+
doc/examples
64+
doc/gallery
65+
doc/tutorials
6466
doc/modules
6567
doc/pyplots/tex_demo.png
6668
doc/users/installing.rst
File renamed without changes.

doc/_static/mpl.css

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,9 @@ div.responsive_subfig img {
785785
div.responsive_subfig {
786786
width: 50%; /* we want 2 subfigs in a row */
787787
}
788+
}
788789

789790
/* Sphinx gallery display */
790-
}
791791

792792
div.align-center {
793793
margin: auto;
@@ -798,6 +798,31 @@ p.caption {
798798
font-weight: bold;
799799
}
800800

801-
div#gallery.section {
801+
div#gallery.section, div#tutorials.section {
802802
overflow: hidden;
803803
}
804+
805+
.sphx-glr-thumbcontainer {
806+
border: solid #d6d6d6 1px !important;
807+
text-align: center !important;
808+
font-size: 1.2em !important;
809+
}
810+
811+
div.sphx-glr-download {
812+
width: auto !important;
813+
}
814+
815+
div.sphx-glr-download a {
816+
background-color: #d9edf7 !important;
817+
border: 1px solid #bce8f1 !important;
818+
background-image: none !important;
819+
}
820+
821+
p.sphx-glr-signature a.reference.external {
822+
display: none !important;
823+
}
824+
825+
.sphx-glr-thumbcontainer a.internal {
826+
font-weight: 400;
827+
}
828+

doc/_templates/layout.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ <h3>{{ _('Navigation') }}</h3>
3939

4040
<li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
4141
<li><a href="{{ pathto('gallery/index') }}">examples</a>|&nbsp;</li>
42+
<li><a href="{{ pathto('tutorials/index') }}">tutorials</a>|&nbsp;</li>
4243
<li><a href="{{ pathto('api/pyplot_summary') }}">pyplot</a>|&nbsp;</li>
4344
<li><a href="{{ pathto('contents') }}">docs</a> &raquo;</li>
4445

doc/api/animation_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ to use the `~MovieWriter.saving` context manager ::
243243
to ensures that setup and cleanup are performed as necessary.
244244

245245

246-
:ref:`animation-moviewriter`
246+
:ref:`sphx_glr_gallery_animation_moviewriter_sgskip.py`
247247

248248

249249
.. _ani_writer_classes:
@@ -267,7 +267,7 @@ Animation Base Classes
267267
Custom Animation classes
268268
------------------------
269269

270-
:ref:`animation-subplots`
270+
:ref:`sphx_glr_gallery_animation_subplots.py`
271271

272272
Writer Registry
273273
---------------

doc/api/api_changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ original location:
782782
* The legend handler interface has changed from a callable, to any object
783783
which implements the ``legend_artists`` method (a deprecation phase will
784784
see this interface be maintained for v1.4). See
785-
:ref:`plotting-guide-legend` for further details. Further legend changes
785+
:ref:`sphx_glr_tutorials_02_intermediate_legend_guide.py` for further details. Further legend changes
786786
include:
787787

788788
* :func:`matplotlib.axes.Axes._get_legend_handles` now returns a generator

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ def _check_deps():
9191

9292
# Sphinx gallery configuration
9393
sphinx_gallery_conf = {
94-
'examples_dirs': '../examples',
94+
'examples_dirs': ['../examples', '../tutorials'],
9595
'filename_pattern': '^((?!sgskip).)*$',
96-
'gallery_dirs': 'gallery',
96+
'gallery_dirs': ['gallery', 'tutorials'],
9797
'doc_module': ('matplotlib',),
9898
'reference_url': {'matplotlib': None,
9999
'numpy': 'http://docs.scipy.org/doc/numpy/reference',

doc/devel/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ Developing a new backend
414414
------------------------
415415

416416
If you are working on a custom backend, the *backend* setting in
417-
:file:`matplotlibrc` (:ref:`customizing-matplotlib`) supports an
417+
:file:`matplotlibrc` (:ref:`sphx_glr_tutorials_01_introductory_customizing.py`) supports an
418418
external backend via the ``module`` directive. If
419419
:file:`my_backend.py` is a Matplotlib backend in your
420420
:envvar:`PYTHONPATH`, you can set it on one of several ways

doc/faq/howto_faq.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If you only want to use the `pandas` converter for `datetime64` values ::
4848
Find all objects in a figure of a certain type
4949
----------------------------------------------
5050

51-
Every Matplotlib artist (see :ref:`artist-tutorial`) has a method
51+
Every Matplotlib artist (see :ref:`sphx_glr_tutorials_02_intermediate_artists.py`) has a method
5252
called :meth:`~matplotlib.artist.Artist.findobj` that can be used to
5353
recursively search the artist for any artists it may contain that meet
5454
some criteria (e.g., match all :class:`~matplotlib.lines.Line2D`
@@ -160,7 +160,7 @@ labels::
160160
ax = fig.add_subplot(111)
161161

162162
You can control the defaults for these parameters in your
163-
:file:`matplotlibrc` file; see :ref:`customizing-matplotlib`. For
163+
:file:`matplotlibrc` file; see :ref:`sphx_glr_tutorials_01_introductory_customizing.py`. For
164164
example, to make the above setting permanent, you would set::
165165

166166
figure.subplot.bottom : 0.2 # the bottom of the subplots of the figure
@@ -191,7 +191,7 @@ specify the location explicitly::
191191
ax = fig.add_axes([left, bottom, width, height])
192192

193193
where all values are in fractional (0 to 1) coordinates. See
194-
:ref:`pylab_examples-axes_demo` for an example of placing axes manually.
194+
:ref:`sphx_glr_gallery_pylab_examples_axes_demo.py` for an example of placing axes manually.
195195

196196
.. _howto-auto-adjust:
197197

@@ -201,7 +201,7 @@ Automatically make room for tick labels
201201
.. note::
202202
This is now easier to handle than ever before.
203203
Calling :func:`~matplotlib.pyplot.tight_layout` can fix many common
204-
layout issues. See the :ref:`plotting-guide-tight-layout`.
204+
layout issues. See the :ref:`sphx_glr_tutorials_02_intermediate_tight_layout_guide.py`.
205205

206206
The information below is kept here in case it is useful for other
207207
purposes.
@@ -340,7 +340,7 @@ and patches, respectively::
340340

341341
.. htmlonly::
342342

343-
See :ref:`pylab_examples-zorder_demo` for a complete example.
343+
See :ref:`sphx_glr_gallery_pylab_examples_zorder_demo.py` for a complete example.
344344

345345
You can also use the Axes property
346346
:meth:`~matplotlib.axes.Axes.set_axisbelow` to control whether the grid
@@ -361,7 +361,7 @@ some ratio which controls the ratio::
361361

362362
.. htmlonly::
363363

364-
See :ref:`subplots_axes_and_figures-equal_aspect_ratio` for a complete
364+
See :ref:`sphx_glr_gallery_subplots_axes_and_figures_equal_aspect_ratio.py` for a complete
365365
example.
366366

367367

@@ -406,7 +406,7 @@ locators as desired because the two axes are independent.
406406

407407
.. htmlonly::
408408

409-
See :ref:`api-two_scales` for a complete example
409+
See :ref:`sphx_glr_gallery_api_two_scales.py` for a complete example
410410

411411
.. _howto-batch:
412412

@@ -652,7 +652,7 @@ For more on configuring your backend, see
652652

653653
Alternatively, you can avoid pylab/pyplot altogether, which will give
654654
you a little more control, by calling the API directly as shown in
655-
:ref:`api-agg_oo`.
655+
:ref:`sphx_glr_gallery_api_agg_oo_sgskip.py`.
656656

657657
You can either generate hardcopy on the filesystem by calling savefig::
658658

doc/faq/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ The Matplotlib FAQ
1515
:maxdepth: 2
1616

1717
installing_faq.rst
18-
usage_faq.rst
1918
howto_faq.rst
2019
troubleshooting_faq.rst
2120
environment_variables_faq.rst

doc/faq/installing_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ and run it with::
3434

3535
This will give you additional information about which backends matplotlib is
3636
loading, version information, and more. At this point you might want to make
37-
sure you understand matplotlib's :ref:`configuration <customizing-matplotlib>`
37+
sure you understand matplotlib's :ref:`configuration <sphx_glr_tutorials_01_introductory_customizing.py>`
3838
process, governed by the :file:`matplotlibrc` configuration file which contains
3939
instructions within and the concept of the matplotlib backend.
4040

doc/faq/troubleshooting_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ please provide the following information in your e-mail to the
108108

109109

110110
* any customizations to your ``matplotlibrc`` file (see
111-
:ref:`customizing-matplotlib`).
111+
:ref:`sphx_glr_tutorials_01_introductory_customizing.py`).
112112

113113
* if the problem is reproducible, please try to provide a *minimal*,
114114
standalone Python script that demonstrates the problem. This is

0 commit comments

Comments
 (0)
0