Skip to content

Add tutorials #8545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
################
# setup.py working directory
build
# sphinx build directory
doc/_build
doc/gallery

# setup.py dist directory
dist
# Egg metadata
Expand All @@ -58,9 +56,13 @@ lib/matplotlib/mpl-data/matplotlibrc

# Documentation generated files #
#################################
# sphinx build directory
doc/_build
doc/api/_as_gen
doc/examples
# autogenerated by sphinx-gallery
doc/examples
doc/gallery
doc/tutorials
doc/modules
doc/pyplots/tex_demo.png
doc/users/installing.rst
Expand Down
File renamed without changes
29 changes: 27 additions & 2 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,9 @@ div.responsive_subfig img {
div.responsive_subfig {
width: 50%; /* we want 2 subfigs in a row */
}
}

/* Sphinx gallery display */
}

div.align-center {
margin: auto;
Expand All @@ -798,6 +798,31 @@ p.caption {
font-weight: bold;
}

div#gallery.section {
div#gallery.section, div#tutorials.section {
overflow: hidden;
}

.sphx-glr-thumbcontainer {
border: solid #d6d6d6 1px !important;
text-align: center !important;
font-size: 1.2em !important;
}

div.sphx-glr-download {
width: auto !important;
}

div.sphx-glr-download a {
background-color: #d9edf7 !important;
border: 1px solid #bce8f1 !important;
background-image: none !important;
}

p.sphx-glr-signature a.reference.external {
display: none !important;
}

.sphx-glr-thumbcontainer a.internal {
font-weight: 400;
}

1 change: 1 addition & 0 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ <h3>{{ _('Navigation') }}</h3>

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

Expand Down
4 changes: 2 additions & 2 deletions doc/api/animation_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ to use the `~MovieWriter.saving` context manager ::
to ensures that setup and cleanup are performed as necessary.


:ref:`animation-moviewriter`
:ref:`sphx_glr_gallery_animation_moviewriter_sgskip.py`


.. _ani_writer_classes:
Expand All @@ -267,7 +267,7 @@ Animation Base Classes
Custom Animation classes
------------------------

:ref:`animation-subplots`
:ref:`sphx_glr_gallery_animation_subplots.py`

Writer Registry
---------------
Expand Down
2 changes: 1 addition & 1 deletion doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ original location:
* The legend handler interface has changed from a callable, to any object
which implements the ``legend_artists`` method (a deprecation phase will
see this interface be maintained for v1.4). See
:ref:`plotting-guide-legend` for further details. Further legend changes
:ref:`sphx_glr_tutorials_02_intermediate_legend_guide.py` for further details. Further legend changes
include:

* :func:`matplotlib.axes.Axes._get_legend_handles` now returns a generator
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@

# Sphinx gallery configuration
sphinx_gallery_conf = {
'examples_dirs': '../examples',
'examples_dirs': ['../examples', '../tutorials'],
'filename_pattern': '^((?!sgskip).)*$',
'gallery_dirs': 'gallery',
'gallery_dirs': ['gallery', 'tutorials'],
'doc_module': ('matplotlib',),
'reference_url': {'matplotlib': None,
'numpy': 'http://docs.scipy.org/doc/numpy/reference',
Expand Down
2 changes: 1 addition & 1 deletion doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Developing a new backend
------------------------

If you are working on a custom backend, the *backend* setting in
:file:`matplotlibrc` (:ref:`customizing-matplotlib`) supports an
:file:`matplotlibrc` (:ref:`sphx_glr_tutorials_01_introductory_customizing.py`) supports an
external backend via the ``module`` directive. If
:file:`my_backend.py` is a Matplotlib backend in your
:envvar:`PYTHONPATH`, you can set it on one of several ways
Expand Down
16 changes: 8 additions & 8 deletions doc/faq/howto_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you only want to use the `pandas` converter for `datetime64` values ::
Find all objects in a figure of a certain type
----------------------------------------------

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

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

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

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

.. _howto-auto-adjust:

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

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

.. htmlonly::

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

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

.. htmlonly::

See :ref:`subplots_axes_and_figures-equal_aspect_ratio` for a complete
See :ref:`sphx_glr_gallery_subplots_axes_and_figures_equal_aspect_ratio.py` for a complete
example.


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

.. htmlonly::

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

.. _howto-batch:

Expand Down Expand Up @@ -652,7 +652,7 @@ For more on configuring your backend, see

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

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

Expand Down
1 change: 0 additions & 1 deletion doc/faq/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ The Matplotlib FAQ
:maxdepth: 2

installing_faq.rst
usage_faq.rst
howto_faq.rst
troubleshooting_faq.rst
environment_variables_faq.rst
Expand Down
2 changes: 1 addition & 1 deletion doc/faq/installing_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and run it with::

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

Expand Down
2 changes: 1 addition & 1 deletion doc/faq/troubleshooting_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ please provide the following information in your e-mail to the


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

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