8000 Fix example links · matplotlib/matplotlib@a009ffd · GitHub
[go: up one dir, main page]

Skip to content

Commit a009ffd

Browse files
committed
Fix example links
1 parent df2c7a9 commit a009ffd

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

doc/devel/add_new_projection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Once the class is defined, it must be registered with matplotlib so
6262
that the user can select it.
6363

6464
A full-fledged and heavily annotated example is in
65-
:file:`examples/api/custom_scale_example.py`. There are also some classes
65+
:doc:`/gallery/scales/custom_scale`. There are also some classes
6666
in :mod:`matplotlib.scale` that may be used as starting points.
6767

6868

@@ -123,7 +123,7 @@ Once the projection axes is defined, it can be used in one of two ways:
123123

124124

125125
A full-fledged and heavily annotated example is in
126-
:file:`examples/api/custom_projection_example.py`. The polar plot
126+
:doc:`/gallery/misc/custom_projection`. The polar plot
127127
functionality in :mod:`matplotlib.projections.polar` may also be of
128128
interest.
129129

doc/devel/documenting_mpl.rst

Lines changed: 10 additions & 10 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ the docstrings of the classes in the Matplotlib library. Except for
3434
:file:`doc/api/api_changes/`, these ``.rst`` files are created when the
3535
documentation is built.
3636

37-
Similarly, the contents of :file:`docs/gallery` and :file:`docs/tutorials` are
37+
Similarly, the contents of :file:`doc/gallery` and :file:`doc/tutorials` are
3838
generated by the `Sphinx Gallery`_ from the sources in :file:`examples` and
3939
:file:`tutorials`. These sources consist of python scripts that have ReST_
4040
documentation built into their comments. Don't directly edit the
41-
``.rst`` files in :file:`docs/gallery` and :file:`docs/tutorials` as they are
41+
``.rst`` files in :file:`doc/gallery` and :file:`doc/tutorials` as they are
4242
regenerated when the documentation are built.
4343

4444
Installing dependencies
@@ -305,7 +305,7 @@ so plots from the examples directory can be included using
305305

306306
.. code-block:: rst
307307
308-
.. plot:: gallery/pylab_examples/simple_plot.py
308+
.. plot:: gallery/lines_bars_and_markers/simple_plot.py
309309
310310
Note that the python script that generates the plot is referred to, rather than
311311
any plot that is created. Sphinx-gallery will provide the correct reference
@@ -631,30 +631,30 @@ Adding figures
631631
As above (see :ref:`rst-figures-and-includes`), figures in the examples gallery
632632
can be referenced with a `:plot:` directive pointing to the python script that
633633
created the figure. For instance the `~.Axes.legend` docstring references
634-
the file :file:`examples/api/legend.py`:
634+
the file :file:`examples/text_labels_and_annotations/legend.py`:
635635

636636
.. code-block:: python
637637
638638
"""
639-
...
639+
...
640640
641641
Examples
642642
--------
643643
644-
.. plot:: gallery/api/legend.py
644+
.. plot:: gallery/text_labels_and_annotations/legend.py
645645
"""
646646
647-
Note that ``examples/api/legend.py`` has been mapped to
648-
``gallery/api/legend.py``, a redirection that may be fixed in future
649-
re-organization of the docs.
647+
Note that ``examples/text_labels_and_annotations/legend.py`` has been mapped to
648+
``gallery/text_labels_and_annotations/legend.py``, a redirection that may be
649+
fixed in future re-organization of the docs.
650650

651651
Plots can also be directly placed inside docstrings. Details are in
652652
:doc:`/devel/plot_directive`. A short example is:
653653

654654
.. code-block:: python
655655
656656
"""
657-
...
657+
...
658658
659659
Examples
660660
--------

lib/matplotlib/collections.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ def __init__(self,
10481048
10491049
%(Collection)s
10501050
1051-
Example: see :file:`examples/dynamic_collection.py` for
1051+
Example: see :doc:`/gallery/event_handling/lasso_demo` for a
10521052
complete example::
10531053
10541054
offsets = np.random.rand(20,2)
@@ -1058,11 +1058,11 @@ def __init__(self,
10581058
collection = RegularPolyCollection(
10591059
numsides=5, # a pentagon
10601060
rotation=0, sizes=(50,),
1061-
facecolors = facecolors,
1062-
edgecolors = (black,),
1063-
linewidths = (1,),
1064-
offsets = offsets,
1065-
transOffset = ax.transData,
1061+
facecolors=facecolors,
1062+
edgecolors=(black,),
1063+
linewidths=(1,),
1064+
offsets=offsets,
1065+
transOffset=ax.transData,
10661066
)
10671067
"""
10681068
Collection.__init__(self, **kwargs)

lib/matplotlib/dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class bytespdate2num(strpdate2num):
358358
"""
359359
Use this class to parse date strings to matplotlib datenums when
360360
you know the date format string of the date you are parsing. See
361-
:file:`examples/misc/load_converter.py`.
361+
:doc:`/gallery/misc/load_converter.py`.
362362
"""
363363
def __init__(self, fmt, encoding='utf-8'):
364364
"""

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,8 @@ def twinx(ax=None):
12841284
12851285
.. seealso::
12861286
1287-
:file:`examples/api_examples/two_scales.py`
1288-
For an example
1287+
:doc:`/gallery/subplots_axes_and_figures/two_scales`
1288+
12891289
"""
12901290
if ax is None:
12911291
ax = gca()

0 commit comments

Comments
 (0)
0