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

Skip to content

Commit 4e93fe4

Browse files
committed
adding sphinx gallery labels
1 parent 0b2619c commit 4e93fe4

File tree

103 files changed

+125
-218
lines changed

Some content is hidden

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

103 files changed

+125
-218
lines changed

doc/_static/depsy_badge.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/_static/mpl.css

Lines changed: 26 additions & 1 deletion
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;
@@ -801,3 +801,28 @@ p.caption {
801801
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/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/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/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

doc/users/dflt_style_changes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ are only specified via hex values. To access these colors outside of
9494
the property cycling the notation for colors ``'CN'``, where ``N``
9595
takes values 0-9, was added to
9696
denote the first 10 colors in ``mpl.rcParams['axes.prop_cycle']`` See
97-
:ref:`colors` for more details.
97+
:ref:`sphx_glr_tutorials_colors_colors.py` for more details.
9898

9999
To restore the old color cycle use
100100

@@ -143,7 +143,7 @@ watch Nathaniel Smith and Stéfan van der Walt's talk from SciPy2015.
143143
See `here for many more details <https://bids.github.io/colormap/>`__
144144
about the other alternatives and the tools used to create the color
145145
map. For details on all of the color maps available in matplotlib see
146-
:ref:`colormaps`.
146+
:ref:`sphx_glr_tutorials_colors_colormaps.py`.
147147

148148
.. raw:: html
149149

doc/users/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ The Matplotlib code is conceptually divided into three parts: the
6262
*pylab interface* is the set of functions provided by
6363
:mod:`matplotlib.pylab` which allow the user to create plots with code
6464
quite similar to MATLAB figure generating code
65-
(:ref:`pyplot-tutorial`). The *Matplotlib frontend* or *Matplotlib
65+
(:ref:`sphx_glr_tutorials_01_introductory_pyplot.py`). The *Matplotlib frontend* or *Matplotlib
6666
API* is the set of classes that do the heavy lifting, creating and
6767
managing figures, text, lines, plots and so on
68-
(:ref:`artist-tutorial`). This is an abstract interface that knows
68+
(:ref:`sphx_glr_tutorials_02_intermediate_artists.py`). This is an abstract interface that knows
6969
nothing about output. The *backends* are device-dependent drawing
7070
devices, aka renderers, that transform the frontend representation to
7171
hardcopy or a display device (:ref:`what-is-a-backend`). Example

doc/users/prev_whats_new/whats_new_0.98.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ psd amplitude scaling
7979

8080
Ryan May did a lot of work to rationalize the amplitude scaling of
8181
:func:`~matplotlib.pyplot.psd` and friends. See
82-
:ref:`pylab_examples-psd_demo2`. and :ref:`pylab_examples-psd_demo3`.
82+
:ref:`sphx_glr_gallery_pylab_examples_psd_demo2.py`. and :ref:`sphx_glr_gallery_pylab_examples_psd_demo3.py`.
8383
The changes should increase MATLAB
8484
compatibility and increase scaling options.
8585

doc/users/prev_whats_new/whats_new_0.99.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ New in matplotlib 0.99
1111
New documentation
1212
-----------------
1313

14-
Jae-Joon Lee has written two new guides :ref:`plotting-guide-legend`
14+
Jae-Joon Lee has written two new guides :ref:`sphx_glr_tutorials_02_intermediate_legend_guide.py`
1515
and :ref:`plotting-guide-annotation`. Michael Sarahan has written
16-
:ref:`image_tutorial`. John Hunter has written two new tutorials on
17-
working with paths and transformations: :ref:`path_tutorial` and
18-
:ref:`transforms_tutorial`.
16+
:ref:`sphx_glr_tutorials_01_introductory_images.py`. John Hunter has written two new tutorials on
17+
working with paths and transformations: :ref:`sphx_glr_tutorials_03_advanced_path_tutorial.py` and
18+
:ref:`sphx_glr_tutorials_03_advanced_transforms_tutorial.py`.
1919

2020
.. _whats-new-mplot3d:
2121

@@ -65,7 +65,7 @@ that denote the data limits -- in various arbitrary locations. No
6565
longer are your axis lines constrained to be a simple rectangle around
6666
the figure -- you can turn on or off left, bottom, right and top, as
6767
well as "detach" the spine to offset it away from the data. See
68-
:ref:`pylab_examples-spine_placement_demo` and
68+
:ref:`sphx_glr_gallery_pylab_examples_spine_placement_demo.py` and
6969
:class:`matplotlib.spines.Spine`.
7070

7171
.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_99_spines_001.png

doc/users/prev_whats_new/whats_new_1.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Sophisticated subplot grid layout
2323

2424
Jae-Joon Lee has written :mod:`~matplotlib.gridspec`, a new module for
2525
doing complex subplot layouts, featuring row and column spans and
26-
more. See :ref:`gridspec-guide` for a tutorial overview.
26+
more. See :ref:`sphx_glr_tutorials_02_intermediate_gridspec.py` for a tutorial overview.
2727

2828
.. figure:: ../../gallery/userdemo/images/sphx_glr_demo_gridspec01_000.png
2929
:target: ../../gallery/userdemo/demo_gridspec01.html
@@ -44,7 +44,7 @@ indexing (starts with 0). e.g.::
4444
fig, axarr = plt.subplots(2, 2)
4545
axarr[0,0].plot([1,2,3]) # upper, left
4646

47-
See :ref:`pylab_examples-subplots_demo` for several code examples.
47+
See :ref:`sphx_glr_gallery_pylab_examples_subplot_demo.py` for several code examples.
4848

4949
Contour fixes and and triplot
5050
---------------------------------

doc/users/prev_whats_new/whats_new_1.1.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Sankey Diagrams
1717

1818
Kevin Davies has extended Yannick Copin's original Sankey example into a module
1919
(:mod:`~matplotlib.sankey`) and provided new examples
20-
(:ref:`api-sankey_basics`, :ref:`api-sankey_links`,
21-
:ref:`api-sankey_rankine`).
20+
(:ref:`sphx_glr_gallery_api_sankey_basics.py`, :ref:`sphx_glr_gallery_api_sankey_links.py`,
21+
:ref:`sphx_glr_gallery_api_sankey_rankine.py`).
2222

2323
.. figure:: ../../gallery/api/images/sphx_glr_sankey_rankine_001.png
2424
:target: ../../gallery/api/sankey_rankine.html
@@ -36,7 +36,7 @@ animated figures. The :mod:`~matplotlib.animation` module is intended
3636
to replace the backend-specific examples formerly in the
3737
:ref:`examples-index` listings. Examples using the new framework are
3838
in :ref:`animation-examples-index`; see the entrancing :ref:`double
39-
pendulum <animation-double_pendulum_animated>` which uses
39+
pendulum <sphx_glr_gallery_animation_double_pendulum_animated_sgskip.py>` which uses
4040
:meth:`matplotlib.animation.Animation.save` to create the movie below.
4141

4242
.. raw:: html
@@ -87,7 +87,7 @@ The usage of this functionality can be as simple as ::
8787

8888
and it will adjust the spacing between subplots
8989
so that the axis labels do not overlap with neighboring subplots. A
90-
:ref:`plotting-guide-tight-layout` has been created to show how to use
90+
:ref:`sphx_glr_tutorials_02_intermediate_tight_layout_guide.py` has been created to show how to use
9191
this new tool.
9292

9393
PyQT4, PySide, and IPython
@@ -116,7 +116,7 @@ legends for complex plots such as :meth:`~matplotlib.pyplot.stem` plots
116116
will now display correctly. Second, the 'best' placement of a legend has
117117
been improved in the presence of NANs.
118118

119-
See the :ref:`plotting-guide-legend` for more detailed explanation and
119+
See the :ref:`sphx_glr_tutorials_02_intermediate_legend_guide.py` for more detailed explanation and
120120
examples.
121121

122122
.. figure:: ../../gallery/pylab_examples/images/sphx_glr_legend_demo4_001.png

doc/users/prev_whats_new/whats_new_1.2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ PGF/TikZ backend
3939
Peter Würtz wrote a backend that allows matplotlib to export figures as
4040
drawing commands for LaTeX. These can be processed by PdfLaTeX, XeLaTeX or
4141
LuaLaTeX using the PGF/TikZ package. Usage examples and documentation are
42-
found in :ref:`pgf-tutorial`.
42+
found in :ref:`sphx_glr_tutorials_text_pgf.py`.
4343

4444
.. image:: /_static/pgf_preamble.*
4545

doc/users/prev_whats_new/whats_new_1.4.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ with :func:`~matplotlib.Axes.bxp`.
8282
Lastly, each artist (e.g., the box, outliers, cap, notches) can now be
8383
toggled on or off and their styles can be passed in through individual
8484
kwargs. See the examples:
85-
:ref:`statistics-boxplot` and
86-
:ref:`statistics-bxp`
85+
:ref:`sphx_glr_gallery_statistics_boxplot.py` and
86+
:ref:`sphx_glr_gallery_statistics_bxp.py`
8787

8888
Added a bool kwarg, :code:`manage_xticks`, which if False disables the management
8989
of the ticks and limits on the x-axis by :func:`~matplotlib.axes.Axes.bxp`.
@@ -410,7 +410,7 @@ instead of ``:context:`` any time you want to reset the context.
410410

411411
Legend and PathEffects documentation
412412
------------------------------------
413-
The :ref:`plotting-guide-legend` and :ref:`patheffects-guide` have both been
413+
The :ref:`sphx_glr_tutorials_02_intermediate_legend_guide.py` and :ref:`sphx_glr_tutorials_03_advanced_patheffects_guide.py` have both been
414414
updated to better reflect the full potential of each of these powerful
415415
features.
416416

doc/users/prev_whats_new/whats_new_1.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ mutually exclusive inside that group. For tools derived from
679679
that are called automatically whenever it is toggled.
680680

681681

682-
A full example is located in :ref:`user_interfaces-toolmanager`
682+
A full example is located in :ref:`sphx_glr_gallery_user_interfaces_toolmanager_sgskip.py`
683683

684684

685685
cbook.is_sequence_of_strings recognizes string objects

doc/users/screenshots.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ fonts. See the :mod:`matplotlib.mathtext` module for additional details.
326326

327327
Matplotlib's mathtext infrastructure is an independent implementation and
328328
does not require TeX or any external packages installed on your computer. See
329-
the tutorial at :ref:`mathtext-tutorial`.
329+
the tutorial at :ref:`sphx_glr_tutorials_text_mathtext.py`.
330330

331331

332332
.. _screenshots_tex_demo:
@@ -361,11 +361,11 @@ to plot the spectrogram of one of the EEG channels.
361361

362362
For examples of how to embed matplotlib in different toolkits, see:
363363

364-
* :ref:`user_interfaces-embedding_in_gtk2`
365-
* :ref:`user_interfaces-embedding_in_wx2`
366-
* :ref:`user_interfaces-mpl_with_glade`
367-
* :ref:`user_interfaces-embedding_in_qt4`
368-
* :ref:`user_interfaces-embedding_in_tk`
364+
* :ref:`sphx_glr_gallery_user_interfaces_embedding_in_gtk2_sgskip.py`
365+
* :ref:`sphx_glr_gallery_user_interfaces_embedding_in_wx2_sgskip.py`
366+
* :ref:`sphx_glr_gallery_user_interfaces_mpl_with_glade_sgskip.py`
367+
* :ref:`sphx_glr_gallery_user_interfaces_embedding_in_qt4_sgskip.py`
368+
* :ref:`sphx_glr_gallery_user_interfaces_embedding_in_tk_sgskip.py`
369369

370370
XKCD-style sketch plots
371371
=======================

doc/users/shell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ are going to need to understand what a matplotlib backend is
9292
With the TkAgg backend, which uses the Tkinter user interface toolkit,
9393
you can use matplotlib from an arbitrary non-gui python shell. Just set your
9494
``backend : TkAgg`` and ``interactive : True`` in your
95-
:file:`matplotlibrc` file (see :ref:`customizing-matplotlib`) and fire
95+
:file:`matplotlibrc` file (see :ref:`sphx_glr_tutorials_01_introductory_customizing.py`) and fire
9696
up python. Then::
9797

9898
>>> from pylab import *

doc/users/whats_new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Filled ``+`` and ``x`` markers
287287

288288
New fillable *plus* and *x* markers have been added. See
289289
the :mod:`~matplotlib.markers` module and
290-
:ref:`marker reference <lines_bars_and_markers-marker_reference>`
290+
:ref:`marker reference <sphx_glr_gallery_lines_bars_and_markers_marker_reference.py>`
291291
examples.
292292

293293
`rcount` and `ccount` for `plot_surface()`

examples/animation/basic_example_writer_sgskip.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- noplot -*-
21
"""
32
===================
43
Saving an animation

examples/animation/double_pendulum_animated_sgskip.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
.. _animation-double_pendulum_animated:
3-
42
===========================
53
The double pendulum problem
64
===========================

examples/animation/moviewriter_sgskip.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# -*- noplot -*-
21
"""
3-
.. _animation-moviewriter:
4-
52
===========
63
MovieWriter
74
===========

examples/animation/subplots.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
.. _animation-subplots:
3-
42
=================
53
Animated subplots
64
=================

0 commit comments

Comments
 (0)