Skip to content

Commit 1e93c5f

Browse files
committed
Fix cross-references in examples.
1 parent 67f59ed commit 1e93c5f

Some content is hidden

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

47 files changed

+110
-246
lines changed

doc/missing-references.json

+15-154
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,6 @@
666666
"Axes": [
667667
"doc/api/_as_gen/matplotlib.pyplot.rst:173:<autosummary>:1",
668668
"doc/api/prev_api_changes/api_changes_3.0.0.rst:449",
669-
"doc/gallery/animation/animated_histogram.rst:112",
670-
"doc/gallery/statistics/errorbars_and_boxes.rst:21",
671669
"doc/users/prev_whats_new/whats_new_1.5.rst:514",
672670
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.delaxes:2",
673671
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.plotting:33"
@@ -1177,8 +1175,6 @@
11771175
"Path": [
11781176
"doc/api/prev_api_changes/api_changes_1.3.x.rst:134",
11791177
"doc/api/prev_api_changes/api_changes_1.3.x.rst:147",
1180-
"doc/gallery/animation/animated_histogram.rst:112",
1181-
"doc/gallery/text_labels_and_annotations/demo_text_path.rst:14",
11821178
"lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.GraphicsContextBase.get_hatch_path:2",
11831179
"lib/matplotlib/textpath.py:docstring of matplotlib.textpath.TextToPath.get_text_path:37"
11841180
],
@@ -1384,7 +1380,6 @@
13841380
"lib/matplotlib/colors.py:docstring of matplotlib.colors:30"
13851381
],
13861382
"'C'": [
1387-
"doc/gallery/color/color_demo.rst:26",
13881383
"doc/tutorials/colors/colors.rst:32",
13891384
"lib/matplotlib/colors.py:docstring of matplotlib.colors:54"
13901385
],
@@ -1413,7 +1408,8 @@
14131408
"numpy.datetime64": [
14141409
"doc/faq/howto_faq.rst:18",
14151410
"doc/faq/howto_faq.rst:21",
1416-
"doc/tutorials/text/text_intro.rst:566",
1411+
"doc/gallery/recipes/common_date_problems.rst:34",
1412+
"doc/tutorials/text/text_intro.rst:581",
14171413
"doc/users/prev_whats_new/whats_new_2.2.rst:155",
14181414
"lib/matplotlib/dates.py:docstring of matplotlib.dates.date2num:8"
14191415
],
@@ -1847,12 +1843,10 @@
18471843
"doc/api/prev_api_changes/api_changes_1.3.x.rst:49"
18481844
],
18491845
"hist": [
1850-
"doc/api/prev_api_changes/api_changes_1.3.x.rst:52",
1851-
"doc/gallery/user_interfaces/svg_histogram_sgskip.rst:33"
1846+
"doc/api/prev_api_changes/api_changes_1.3.x.rst:52"
18521847
],
18531848
"width": [
18541849
"doc/api/prev_api_changes/api_changes_1.3.x.rst:52",
1855-
"doc/gallery/pie_and_polar_charts/nested_pie.rst:39",
18561850
"lib/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:72"
18571851
],
18581852
"rwidth": [
@@ -2112,12 +2106,10 @@
21122106
"doc/api/prev_api_changes/api_changes_1.4.x.rst:102"
21132107
],
21142108
"xytext": [
2115-
"doc/api/prev_api_changes/api_changes_1.4.x.rst:102",
2116-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:39"
2109+
"doc/api/prev_api_changes/api_changes_1.4.x.rst:102"
21172110
],
21182111
"textcoords": [
2119-
"doc/api/prev_api_changes/api_changes_1.4.x.rst:102",
2120-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:39"
2112+
"doc/api/prev_api_changes/api_changes_1.4.x.rst:102"
21212113
],
21222114
"xyann": [
21232115
"doc/api/prev_api_changes/api_changes_1.4.x.rst:102",
@@ -2132,12 +2124,10 @@
21322124
],
21332125
"xy": [
21342126
"doc/api/prev_api_changes/api_changes_1.4.x.rst:110",
2135-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:39",
21362127
"lib/matplotlib/widgets.py:docstring of matplotlib.widgets.Lasso:8"
21372128
],
21382129
"xycoords": [
2139-
"doc/api/prev_api_changes/api_changes_1.4.x.rst:112",
2140-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:39"
2130+
"doc/api/prev_api_changes/api_changes_1.4.x.rst:112"
21412131
],
21422132
"set_position()": [
21432133
"doc/api/prev_api_changes/api_changes_1.4.x.rst:113"
@@ -2161,7 +2151,6 @@
21612151
],
21622152
"FormatStrFormatter": [
21632153
"doc/api/prev_api_changes/api_changes_1.4.x.rst:133",
2164-
"doc/gallery/ticks_and_spines/major_minor_demo.rst:24",
21652154
"doc/users/prev_whats_new/whats_new_1.4.rst:129"
21662155
],
21672156
"matplotlib.testing.image_util": [
@@ -2243,9 +2232,6 @@
22432232
],
22442233
"GridSpec": [
22452234
"doc/api/prev_api_changes/api_changes_1.4.x.rst:181",
2246-
"doc/gallery/userdemo/demo_gridspec01.rst:14",
2247-
"doc/gallery/userdemo/demo_gridspec03.rst:14",
2248-
"doc/gallery/userdemo/demo_gridspec06.rst:14",
22492235
"doc/tutorials/intermediate/constrainedlayout_guide.rst:821"
22502236
],
22512237
"matplotlib.cbook.ls_mapper": [
@@ -2417,7 +2403,6 @@
24172403
],
24182404
"bar": [
24192405
"doc/api/prev_api_changes/api_changes_2.0.1.rst:36",
2420-
"doc/gallery/axisartist/demo_floating_axes.rst:16",
24212406
"doc/users/prev_whats_new/whats_new_1.5.rst:457"
24222407
],
24232408
"plt.bar": [
@@ -2439,8 +2424,7 @@
24392424
"doc/api/prev_api_changes/api_changes_2.1.0.rst:56"
24402425
],
24412426
"np.datetime64": [
2442-
"doc/api/prev_api_changes/api_changes_2.1.0.rst:95",
2443-
"doc/gallery/recipes/common_date_problems.rst:34"
2427+
"doc/api/prev_api_changes/api_changes_2.1.0.rst:95"
24442428
],
24452429
"matplotlib.mlab.griddata": [
24462430
"doc/api/prev_api_changes/api_changes_2.1.0.rst:117"
@@ -2644,7 +2628,6 @@
26442628
"lib/matplotlib/projections/polar.py:docstring of matplotlib.projections.polar.ThetaTick:4"
26452629
],
26462630
"plot": [
2647-
"doc/gallery/units/units_sample.rst:14",
26482631
"doc/users/prev_whats_new/changelog.rst:232",
26492632
"lib/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:4"
26502633
],
@@ -3233,149 +3216,40 @@
32333216
"set_color": [
32343217
"doc/faq/howto_faq.rst:45"
32353218
],
3236-
"Patch": [
3237-
"doc/gallery/animation/animated_histogram.rst:112",
3238-
"doc/users/prev_whats_new/whats_new_1.5.rst:321",
3239-
"doc/users/prev_whats_new/whats_new_1.5.rst:324"
3240-
],
3241-
"FuncAnimation": [
3242-
"doc/gallery/animation/animated_histogram.rst:112"
3243-
],
3244-
"mpl_toolkits.axes_grid1.inset_axes": [
3245-
"doc/gallery/axes_grid1/demo_colorbar_with_inset_locator.rst:14"
3246-
],
3247-
"scatter": [
3248-
"doc/gallery/axisartist/demo_floating_axes.rst:16"
3249-
],
3250-
"GridHelperCurveLinear": [
3251-
"doc/gallery/axisartist/demo_floating_axes.rst:17",
3252-
"doc/gallery/axisartist/demo_floating_axes.rst:18",
3219+
"floating_axes.FloatingSubplot": [
32533220
"doc/gallery/axisartist/demo_floating_axes.rst:20"
32543221
],
3255-
"FloatingSubplot": [
3256-
"doc/gallery/axisartist/demo_floating_axes.rst:18"
3257-
],
3258-
"LinearSegmentedColormap": [
3259-
"doc/gallery/color/custom_cmap.rst:17",
3260-
"doc/tutorials/colors/colormap-manipulation.rst:181"
3261-
],
3262-
"text.Text": [
3263-
"doc/gallery/images_contours_and_fields/demo_bboximage.rst:14"
3264-
],
3265-
"interpolation": [
3266-
"doc/gallery/images_contours_and_fields/interpolation_methods.rst:17"
3267-
],
3268-
"interpolation=\"antialiased\"": [
3269-
"doc/gallery/images_contours_and_fields/interpolation_methods.rst:26"
3270-
],
3271-
"extent=(0, 1, 0, 1), transform=ax.transAxes": [
3272-
"doc/gallery/lines_bars_and_markers/gradient_bar.rst:23"
3273-
],
3274-
"intersect_bbox": [
3275-
"doc/gallery/misc/bbox_intersect.rst:14"
3276-
],
32773222
"Glyph": [
32783223
"doc/gallery/misc/ftface_props.rst:14"
32793224
],
32803225
"load_char": [
32813226
"doc/gallery/misc/ftface_props.rst:14"
32823227
],
3283-
"from matplotlib.backends.backend_pgf import PdfPages": [
3284-
"doc/gallery/misc/multipage_pdf.rst:17"
3285-
],
3286-
"attach_note": [
3287-
"doc/gallery/misc/multipage_pdf.rst:17"
3288-
],
3289-
"Axes3D.voxels": [
3290-
"doc/gallery/mplot3d/voxels_rgb.rst:14"
3291-
],
3292-
"wedgeprops": [
3293-
"doc/gallery/pie_and_polar_charts/nested_pie.rst:39"
3294-
],
3295-
"set_label_coords": [
3296-
"doc/gallery/pyplots/align_ylabels.rst:74"
3297-
],
3298-
"Figure.constrained_layout": [
3299-
"doc/gallery/pyplots/auto_subplots_adjust.rst:18"
3300-
],
3301-
"pyplot.subplot": [
3302-
"doc/gallery/pyplots/pyplot_two_subplots.rst:14"
3303-
],
3304-
"semilogx": [
3305-
"doc/gallery/scales/log_test.rst:14"
3306-
],
3307-
"maxiter": [
3308-
"doc/gallery/showcase/mandelbrot.rst:18"
3309-
],
3310-
"maxiter=200": [
3311-
"doc/gallery/showcase/mandelbrot.rst:18"
3312-
],
3313-
"imshow": [
3314-
"doc/gallery/specialty_plots/mri_demo.rst:14"
3315-
],
3316-
"errorbar_demo.py": [
3317-
"doc/gallery/statistics/errorbar_features.rst:14"
3228+
"Patch": [
3229+
"doc/users/prev_whats_new/whats_new_1.5.rst:321",
3230+
"doc/users/prev_whats_new/whats_new_1.5.rst:324"
33183231
],
3319-
"patches": [
3320-
"doc/gallery/statistics/hist.rst:72"
3232+
"LinearSegmentedColormap": [
3233+
"doc/tutorials/colors/colormap-manipulation.rst:181"
33213234
],
33223235
"Figure.align_xlabels": [
3323-
"doc/gallery/subplots_axes_and_figures/align_labels_demo.rst:14",
33243236
"doc/users/prev_whats_new/whats_new_2.2.rst:70"
33253237
],
33263238
"Figure.align_ylabels": [
3327-
"doc/gallery/subplots_axes_and_figures/align_labels_demo.rst:14",
33283239
"doc/users/prev_whats_new/whats_new_2.2.rst:70"
33293240
],
33303241
"Figure.align_labels": [
3331-
"doc/gallery/subplots_axes_and_figures/align_labels_demo.rst:17",
33323242
"doc/users/prev_whats_new/whats_new_2.2.rst:84"
33333243
],
3334-
"Axes.axes.secondary_xaxis": [
3335-
"doc/gallery/subplots_axes_and_figures/secondary_axis.rst:14"
3336-
],
3337-
"Axes.axes.secondary_yaxis": [
3338-
"doc/gallery/subplots_axes_and_figures/secondary_axis.rst:14"
3339-
],
3340-
"axs": [
3341-
"doc/gallery/subplots_axes_and_figures/subplots_demo.rst:138",
3342-
"doc/gallery/subplots_axes_and_figures/subplots_demo.rst:71"
3343-
],
3344-
"xy=(x, y)": [
3345-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:39"
3346-
],
3347-
"xytext=(x, y)": [
3348-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:39"
3349-
],
3350-
"font_manager.FontProperties": [
3351-
"doc/gallery/text_labels_and_annotations/font_file.rst:14"
3352-
],
33533244
"ConciseDateConverter": [
3354-
"doc/gallery/ticks_and_spines/date_concise_formatter.rst:209"
3355-
],
3356-
"MultipleLocator": [
3357-
"doc/gallery/ticks_and_spines/major_minor_demo.rst:24"
3245+
"doc/gallery/ticks_and_spines/date_concise_formatter.rst:215"
33583246
],
33593247
"ScalarFormatter": [
3360-
"doc/gallery/ticks_and_spines/scalarformatter.rst:14",
33613248
"doc/users/prev_whats_new/whats_new_1.4.rst:293"
33623249
],
3363-
"xunits": [
3364-
"doc/gallery/units/units_sample.rst:14"
3365-
],
3366-
"yunits": [
3367-
"doc/gallery/units/units_sample.rst:14"
3368-
],
3369-
"title": [
3370-
"doc/gallery/user_interfaces/svg_tooltip_sgskip.rst:23"
3371-
],
33723250
"ConnectionPatch": [
3373-
"doc/gallery/userdemo/connect_simple01.rst:14",
33743251
"doc/users/prev_whats_new/whats_new_3.1.0.rst:178"
33753252
],
3376-
"plt.subplot2grid": [
3377-
"doc/gallery/userdemo/demo_gridspec01.rst:14"
3378-
],
33793253
"pyplot": [
33803254
"doc/index.rst:44"
33813255
],
@@ -4739,15 +4613,9 @@
47394613
"lib/matplotlib/widgets.py:docstring of matplotlib.widgets.RectangleSelector:1",
47404614
"lib/matplotlib/widgets.py:docstring of matplotlib.widgets.SpanSelector:1"
47414615
],
4742-
"~.collections.PatchCollection": [
4743-
"doc/gallery/shapes_and_collections/patch_collection.rst:14"
4744-
],
47454616
"numpy.datetime64": [
47464617
"doc/gallery/text_labels_and_annotations/date.rst:18"
47474618
],
4748-
"~matplotlib.spines.Spine": [
4749-
"doc/gallery/ticks_and_spines/multiple_yaxis_with_spines.rst:18"
4750-
],
47514619
"matplotlib.patch.PathPatch": [
47524620
"doc/tutorials/advanced/path_tutorial.rst:202"
47534621
],
@@ -5163,9 +5031,6 @@
51635031
"matplotlib.get_cachedir": [
51645032
"doc/faq/troubleshooting_faq.rst:52"
51655033
],
5166-
"matplotlib.pyplots.subplots": [
5167-
"doc/gallery/recipes/create_subplots.rst:43"
5168-
],
51695034
"colors.BoundaryNorm": [
51705035
"doc/tutorials/colors/colorbar_only.rst:65",
51715036
"doc/tutorials/colors/colormapnorms.rst:188"
@@ -5335,11 +5200,7 @@
53355200
"matplotlib.tests.test_basic": [
53365201
"doc/devel/testing.rst:99"
53375202
],
5338-
"animation": [
5339-
"doc/gallery/animation/animation_demo.rst:16"
5340-
],
53415203
"matplotlib": [
5342-
"doc/gallery/text_labels_and_annotations/annotation_demo.rst:14",
53435204
"doc/tutorials/introductory/usage.rst:591"
53445205
],
53455206
"matplotlib.patch": [
@@ -5378,4 +5239,4 @@
53785239
"doc/users/prev_whats_new/whats_new_1.5.rst:737"
53795240
]
53805241
}
5381-
}
5242+
}

examples/animation/animated_histogram.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
###############################################################################
3131
# Here comes the tricky part -- we have to set up the vertex and path codes
32-
# arrays using ``plt.Path.MOVETO``, ``plt.Path.LINETO`` and
33-
# ``plt.Path.CLOSEPOLY`` for each rect.
32+
# arrays using `.Path.MOVETO`, `.Path.LINETO` and `.Path.CLOSEPOLY` for each
33+
# rect.
3434
#
3535
# * We need 1 ``MOVETO`` per rectangle, which sets the initial point.
3636
# * We need 3 ``LINETO``'s, which tell Matplotlib to draw lines from
@@ -61,7 +61,7 @@
6161
# To animate the histogram, we need an ``animate`` function, which generates
6262
# a random set of numbers and updates the locations of the vertices for the
6363
# histogram (in this case, only the heights of each rectangle). ``patch`` will
64-
# eventually be a ``Patch`` object.
64+
# eventually be a `.Patch` object.
6565
patch = None
6666

6767

@@ -75,9 +75,9 @@ def animate(i):
7575
return [patch, ]
7676

7777
###############################################################################
78-
# And now we build the `Path` and `Patch` instances for the histogram using
79-
# our vertices and codes. We add the patch to the `Axes` instance, and setup
80-
# the `FuncAnimation` with our animate function.
78+
# And now we build the `.Path` and `.Patch` instances for the histogram using
79+
# our vertices and codes. We add the patch to the `~.axes.Axes` instance, and
80+
# setup the `.FuncAnimation` with our ``animate`` function.
8181
fig, ax = plt.subplots()
8282
barpath = path.Path(verts, codes)
8383
patch = patches.PathPatch(

examples/animation/animation_demo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Generating an animation by calling `~.pyplot.pause` between plotting commands.
77
88
The method shown here is only suitable for simple, low-performance use. For
9-
more demanding applications, look at the :mod:`animation` module and the
9+
more demanding applications, look at the :mod:`.animation` module and the
1010
examples that use it.
1111
1212
Note that calling `time.sleep` instead of `~.pyplot.pause` would *not* work.

examples/axes_grid1/demo_colorbar_with_inset_locator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
==============================================================
55
66
This example shows how to control the position, height, and width of
7-
colorbars using `~mpl_toolkits.axes_grid1.inset_axes`.
7+
colorbars using `~mpl_toolkits.axes_grid1.inset_locator.inset_axes`.
88
99
Controlling the placement of the inset axes is done similarly as that of the
1010
legend: either by providing a location option ("upper right", "best", ...), or

examples/axisartist/demo_floating_axes.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
66
Demonstration of features of the :mod:`.floating_axes` module:
77
8-
* Using `scatter` and `bar` with changing the shape of the plot.
9-
* Using `GridHelperCurveLinear` to rotate the plot and set the plot boundary.
10-
* Using `FloatingSubplot` to create a subplot using the return value from
11-
`GridHelperCurveLinear`.
12-
* Making a sector plot by adding more features to `GridHelperCurveLinear`.
8+
* Using `~.axes.Axes.scatter` and `~.axes.Axes.bar` with changing the shape of
9+
the plot.
10+
* Using `~.floating_axes.GridHelperCurveLinear` to rotate the plot and set the
11+
plot boundary.
12+
* Using `~.floating_axes.FloatingSubplot` to create a subplot using the return
13+
value from `~.floating_axes.GridHelperCurveLinear`.
14+
* Making a sector plot by adding more features to
15+
`~.floating_axes.GridHelperCurveLinear`.
1316
"""
1417

1518
from matplotlib.transforms import Affine2D

0 commit comments

Comments
 (0)