diff --git a/doc/missing-references.json b/doc/missing-references.json index 84bc5f40aacc..66f2749bed7e 100644 --- a/doc/missing-references.json +++ b/doc/missing-references.json @@ -666,8 +666,6 @@ "Axes": [ "doc/api/_as_gen/matplotlib.pyplot.rst:173::1", "doc/api/prev_api_changes/api_changes_3.0.0.rst:449", - "doc/gallery/animation/animated_histogram.rst:112", - "doc/gallery/statistics/errorbars_and_boxes.rst:21", "doc/users/prev_whats_new/whats_new_1.5.rst:514", "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.delaxes:2", "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.plotting:33" @@ -1177,8 +1175,6 @@ "Path": [ "doc/api/prev_api_changes/api_changes_1.3.x.rst:134", "doc/api/prev_api_changes/api_changes_1.3.x.rst:147", - "doc/gallery/animation/animated_histogram.rst:112", - "doc/gallery/text_labels_and_annotations/demo_text_path.rst:14", "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.GraphicsContextBase.get_hatch_path:2", "lib/matplotlib/textpath.py:docstring of matplotlib.textpath.TextToPath.get_text_path:37" ], @@ -1384,7 +1380,6 @@ "lib/matplotlib/colors.py:docstring of matplotlib.colors:30" ], "'C'": [ - "doc/gallery/color/color_demo.rst:26", "doc/tutorials/colors/colors.rst:32", "lib/matplotlib/colors.py:docstring of matplotlib.colors:54" ], @@ -1413,7 +1408,8 @@ "numpy.datetime64": [ "doc/faq/howto_faq.rst:18", "doc/faq/howto_faq.rst:21", - "doc/tutorials/text/text_intro.rst:566", + "doc/gallery/recipes/common_date_problems.rst:34", + "doc/tutorials/text/text_intro.rst:581", "doc/users/prev_whats_new/whats_new_2.2.rst:155", "lib/matplotlib/dates.py:docstring of matplotlib.dates.date2num:8" ], @@ -1847,12 +1843,10 @@ "doc/api/prev_api_changes/api_changes_1.3.x.rst:49" ], "hist": [ - "doc/api/prev_api_changes/api_changes_1.3.x.rst:52", - "doc/gallery/user_interfaces/svg_histogram_sgskip.rst:33" + "doc/api/prev_api_changes/api_changes_1.3.x.rst:52" ], "width": [ "doc/api/prev_api_changes/api_changes_1.3.x.rst:52", - "doc/gallery/pie_and_polar_charts/nested_pie.rst:39", "lib/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:72" ], "rwidth": [ @@ -2112,12 +2106,10 @@ "doc/api/prev_api_changes/api_changes_1.4.x.rst:102" ], "xytext": [ - "doc/api/prev_api_changes/api_changes_1.4.x.rst:102", - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:39" + "doc/api/prev_api_changes/api_changes_1.4.x.rst:102" ], "textcoords": [ - "doc/api/prev_api_changes/api_changes_1.4.x.rst:102", - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:39" + "doc/api/prev_api_changes/api_changes_1.4.x.rst:102" ], "xyann": [ "doc/api/prev_api_changes/api_changes_1.4.x.rst:102", @@ -2132,12 +2124,10 @@ ], "xy": [ "doc/api/prev_api_changes/api_changes_1.4.x.rst:110", - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:39", "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.Lasso:8" ], "xycoords": [ - "doc/api/prev_api_changes/api_changes_1.4.x.rst:112", - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:39" + "doc/api/prev_api_changes/api_changes_1.4.x.rst:112" ], "set_position()": [ "doc/api/prev_api_changes/api_changes_1.4.x.rst:113" @@ -2161,7 +2151,6 @@ ], "FormatStrFormatter": [ "doc/api/prev_api_changes/api_changes_1.4.x.rst:133", - "doc/gallery/ticks_and_spines/major_minor_demo.rst:24", "doc/users/prev_whats_new/whats_new_1.4.rst:129" ], "matplotlib.testing.image_util": [ @@ -2243,9 +2232,6 @@ ], "GridSpec": [ "doc/api/prev_api_changes/api_changes_1.4.x.rst:181", - "doc/gallery/userdemo/demo_gridspec01.rst:14", - "doc/gallery/userdemo/demo_gridspec03.rst:14", - "doc/gallery/userdemo/demo_gridspec06.rst:14", "doc/tutorials/intermediate/constrainedlayout_guide.rst:821" ], "matplotlib.cbook.ls_mapper": [ @@ -2417,7 +2403,6 @@ ], "bar": [ "doc/api/prev_api_changes/api_changes_2.0.1.rst:36", - "doc/gallery/axisartist/demo_floating_axes.rst:16", "doc/users/prev_whats_new/whats_new_1.5.rst:457" ], "plt.bar": [ @@ -2439,8 +2424,7 @@ "doc/api/prev_api_changes/api_changes_2.1.0.rst:56" ], "np.datetime64": [ - "doc/api/prev_api_changes/api_changes_2.1.0.rst:95", - "doc/gallery/recipes/common_date_problems.rst:34" + "doc/api/prev_api_changes/api_changes_2.1.0.rst:95" ], "matplotlib.mlab.griddata": [ "doc/api/prev_api_changes/api_changes_2.1.0.rst:117" @@ -2644,7 +2628,6 @@ "lib/matplotlib/projections/polar.py:docstring of matplotlib.projections.polar.ThetaTick:4" ], "plot": [ - "doc/gallery/units/units_sample.rst:14", "doc/users/prev_whats_new/changelog.rst:232", "lib/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:4" ], @@ -3233,149 +3216,40 @@ "set_color": [ "doc/faq/howto_faq.rst:45" ], - "Patch": [ - "doc/gallery/animation/animated_histogram.rst:112", - "doc/users/prev_whats_new/whats_new_1.5.rst:321", - "doc/users/prev_whats_new/whats_new_1.5.rst:324" - ], - "FuncAnimation": [ - "doc/gallery/animation/animated_histogram.rst:112" - ], - "mpl_toolkits.axes_grid1.inset_axes": [ - "doc/gallery/axes_grid1/demo_colorbar_with_inset_locator.rst:14" - ], - "scatter": [ - "doc/gallery/axisartist/demo_floating_axes.rst:16" - ], - "GridHelperCurveLinear": [ - "doc/gallery/axisartist/demo_floating_axes.rst:17", - "doc/gallery/axisartist/demo_floating_axes.rst:18", + "floating_axes.FloatingSubplot": [ "doc/gallery/axisartist/demo_floating_axes.rst:20" ], - "FloatingSubplot": [ - "doc/gallery/axisartist/demo_floating_axes.rst:18" - ], - "LinearSegmentedColormap": [ - "doc/gallery/color/custom_cmap.rst:17", - "doc/tutorials/colors/colormap-manipulation.rst:181" - ], - "text.Text": [ - "doc/gallery/images_contours_and_fields/demo_bboximage.rst:14" - ], - "interpolation": [ - "doc/gallery/images_contours_and_fields/interpolation_methods.rst:17" - ], - "interpolation=\"antialiased\"": [ - "doc/gallery/images_contours_and_fields/interpolation_methods.rst:26" - ], - "extent=(0, 1, 0, 1), transform=ax.transAxes": [ - "doc/gallery/lines_bars_and_markers/gradient_bar.rst:23" - ], - "intersect_bbox": [ - "doc/gallery/misc/bbox_intersect.rst:14" - ], "Glyph": [ "doc/gallery/misc/ftface_props.rst:14" ], "load_char": [ "doc/gallery/misc/ftface_props.rst:14" ], - "from matplotlib.backends.backend_pgf import PdfPages": [ - "doc/gallery/misc/multipage_pdf.rst:17" - ], - "attach_note": [ - "doc/gallery/misc/multipage_pdf.rst:17" - ], - "Axes3D.voxels": [ - "doc/gallery/mplot3d/voxels_rgb.rst:14" - ], - "wedgeprops": [ - "doc/gallery/pie_and_polar_charts/nested_pie.rst:39" - ], - "set_label_coords": [ - "doc/gallery/pyplots/align_ylabels.rst:74" - ], - "Figure.constrained_layout": [ - "doc/gallery/pyplots/auto_subplots_adjust.rst:18" - ], - "pyplot.subplot": [ - "doc/gallery/pyplots/pyplot_two_subplots.rst:14" - ], - "semilogx": [ - "doc/gallery/scales/log_test.rst:14" - ], - "maxiter": [ - "doc/gallery/showcase/mandelbrot.rst:18" - ], - "maxiter=200": [ - "doc/gallery/showcase/mandelbrot.rst:18" - ], - "imshow": [ - "doc/gallery/specialty_plots/mri_demo.rst:14" - ], - "errorbar_demo.py": [ - "doc/gallery/statistics/errorbar_features.rst:14" + "Patch": [ + "doc/users/prev_whats_new/whats_new_1.5.rst:321", + "doc/users/prev_whats_new/whats_new_1.5.rst:324" ], - "patches": [ - "doc/gallery/statistics/hist.rst:72" + "LinearSegmentedColormap": [ + "doc/tutorials/colors/colormap-manipulation.rst:181" ], "Figure.align_xlabels": [ - "doc/gallery/subplots_axes_and_figures/align_labels_demo.rst:14", "doc/users/prev_whats_new/whats_new_2.2.rst:70" ], "Figure.align_ylabels": [ - "doc/gallery/subplots_axes_and_figures/align_labels_demo.rst:14", "doc/users/prev_whats_new/whats_new_2.2.rst:70" ], "Figure.align_labels": [ - "doc/gallery/subplots_axes_and_figures/align_labels_demo.rst:17", "doc/users/prev_whats_new/whats_new_2.2.rst:84" ], - "Axes.axes.secondary_xaxis": [ - "doc/gallery/subplots_axes_and_figures/secondary_axis.rst:14" - ], - "Axes.axes.secondary_yaxis": [ - "doc/gallery/subplots_axes_and_figures/secondary_axis.rst:14" - ], - "axs": [ - "doc/gallery/subplots_axes_and_figures/subplots_demo.rst:138", - "doc/gallery/subplots_axes_and_figures/subplots_demo.rst:71" - ], - "xy=(x, y)": [ - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:39" - ], - "xytext=(x, y)": [ - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:39" - ], - "font_manager.FontProperties": [ - "doc/gallery/text_labels_and_annotations/font_file.rst:14" - ], "ConciseDateConverter": [ - "doc/gallery/ticks_and_spines/date_concise_formatter.rst:209" - ], - "MultipleLocator": [ - "doc/gallery/ticks_and_spines/major_minor_demo.rst:24" + "doc/gallery/ticks_and_spines/date_concise_formatter.rst:215" ], "ScalarFormatter": [ - "doc/gallery/ticks_and_spines/scalarformatter.rst:14", "doc/users/prev_whats_new/whats_new_1.4.rst:293" ], - "xunits": [ - "doc/gallery/units/units_sample.rst:14" - ], - "yunits": [ - "doc/gallery/units/units_sample.rst:14" - ], - "title": [ - "doc/gallery/user_interfaces/svg_tooltip_sgskip.rst:23" - ], "ConnectionPatch": [ - "doc/gallery/userdemo/connect_simple01.rst:14", "doc/users/prev_whats_new/whats_new_3.1.0.rst:178" ], - "plt.subplot2grid": [ - "doc/gallery/userdemo/demo_gridspec01.rst:14" - ], "pyplot": [ "doc/index.rst:44" ], @@ -4739,15 +4613,9 @@ "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.RectangleSelector:1", "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.SpanSelector:1" ], - "~.collections.PatchCollection": [ - "doc/gallery/shapes_and_collections/patch_collection.rst:14" - ], "numpy.datetime64": [ "doc/gallery/text_labels_and_annotations/date.rst:18" ], - "~matplotlib.spines.Spine": [ - "doc/gallery/ticks_and_spines/multiple_yaxis_with_spines.rst:18" - ], "matplotlib.patch.PathPatch": [ "doc/tutorials/advanced/path_tutorial.rst:202" ], @@ -5163,9 +5031,6 @@ "matplotlib.get_cachedir": [ "doc/faq/troubleshooting_faq.rst:52" ], - "matplotlib.pyplots.subplots": [ - "doc/gallery/recipes/create_subplots.rst:43" - ], "colors.BoundaryNorm": [ "doc/tutorials/colors/colorbar_only.rst:65", "doc/tutorials/colors/colormapnorms.rst:188" @@ -5335,11 +5200,7 @@ "matplotlib.tests.test_basic": [ "doc/devel/testing.rst:99" ], - "animation": [ - "doc/gallery/animation/animation_demo.rst:16" - ], "matplotlib": [ - "doc/gallery/text_labels_and_annotations/annotation_demo.rst:14", "doc/tutorials/introductory/usage.rst:591" ], "matplotlib.patch": [ @@ -5378,4 +5239,4 @@ "doc/users/prev_whats_new/whats_new_1.5.rst:737" ] } -} \ No newline at end of file +} diff --git a/examples/animation/animated_histogram.py b/examples/animation/animated_histogram.py index 2556708dd7e7..fc4e7f2dad69 100644 --- a/examples/animation/animated_histogram.py +++ b/examples/animation/animated_histogram.py @@ -29,8 +29,8 @@ ############################################################################### # Here comes the tricky part -- we have to set up the vertex and path codes -# arrays using ``plt.Path.MOVETO``, ``plt.Path.LINETO`` and -# ``plt.Path.CLOSEPOLY`` for each rect. +# arrays using `.Path.MOVETO`, `.Path.LINETO` and `.Path.CLOSEPOLY` for each +# rect. # # * We need 1 ``MOVETO`` per rectangle, which sets the initial point. # * We need 3 ``LINETO``'s, which tell Matplotlib to draw lines from @@ -61,7 +61,7 @@ # To animate the histogram, we need an ``animate`` function, which generates # a random set of numbers and updates the locations of the vertices for the # histogram (in this case, only the heights of each rectangle). ``patch`` will -# eventually be a ``Patch`` object. +# eventually be a `.Patch` object. patch = None @@ -75,9 +75,9 @@ def animate(i): return [patch, ] ############################################################################### -# And now we build the `Path` and `Patch` instances for the histogram using -# our vertices and codes. We add the patch to the `Axes` instance, and setup -# the `FuncAnimation` with our animate function. +# And now we build the `.Path` and `.Patch` instances for the histogram using +# our vertices and codes. We add the patch to the `~.axes.Axes` instance, and +# setup the `.FuncAnimation` with our ``animate`` function. fig, ax = plt.subplots() barpath = path.Path(verts, codes) patch = patches.PathPatch( diff --git a/examples/animation/animation_demo.py b/examples/animation/animation_demo.py index d83d634b48ec..beab2801d731 100644 --- a/examples/animation/animation_demo.py +++ b/examples/animation/animation_demo.py @@ -6,7 +6,7 @@ Generating an animation by calling `~.pyplot.pause` between plotting commands. The method shown here is only suitable for simple, low-performance use. For -more demanding applications, look at the :mod:`animation` module and the +more demanding applications, look at the :mod:`.animation` module and the examples that use it. Note that calling `time.sleep` instead of `~.pyplot.pause` would *not* work. diff --git a/examples/axes_grid1/demo_colorbar_with_inset_locator.py b/examples/axes_grid1/demo_colorbar_with_inset_locator.py index 0133da3f22b4..94d435d6b288 100644 --- a/examples/axes_grid1/demo_colorbar_with_inset_locator.py +++ b/examples/axes_grid1/demo_colorbar_with_inset_locator.py @@ -4,7 +4,7 @@ ============================================================== This example shows how to control the position, height, and width of -colorbars using `~mpl_toolkits.axes_grid1.inset_axes`. +colorbars using `~mpl_toolkits.axes_grid1.inset_locator.inset_axes`. Controlling the placement of the inset axes is done similarly as that of the legend: either by providing a location option ("upper right", "best", ...), or diff --git a/examples/axisartist/demo_floating_axes.py b/examples/axisartist/demo_floating_axes.py index db133fcd89f6..1994163f0058 100644 --- a/examples/axisartist/demo_floating_axes.py +++ b/examples/axisartist/demo_floating_axes.py @@ -5,11 +5,14 @@ Demonstration of features of the :mod:`.floating_axes` module: -* Using `scatter` and `bar` with changing the shape of the plot. -* Using `GridHelperCurveLinear` to rotate the plot and set the plot boundary. -* Using `FloatingSubplot` to create a subplot using the return value from - `GridHelperCurveLinear`. -* Making a sector plot by adding more features to `GridHelperCurveLinear`. +* Using `~.axes.Axes.scatter` and `~.axes.Axes.bar` with changing the shape of + the plot. +* Using `~.floating_axes.GridHelperCurveLinear` to rotate the plot and set the + plot boundary. +* Using `~.floating_axes.FloatingSubplot` to create a subplot using the return + value from `~.floating_axes.GridHelperCurveLinear`. +* Making a sector plot by adding more features to + `~.floating_axes.GridHelperCurveLinear`. """ from matplotlib.transforms import Affine2D diff --git a/examples/axisartist/demo_floating_axis.py b/examples/axisartist/demo_floating_axis.py index 4915df1c107e..fe7bdc82f570 100644 --- a/examples/axisartist/demo_floating_axis.py +++ b/examples/axisartist/demo_floating_axis.py @@ -7,7 +7,7 @@ The following code demonstrates how to put a floating polar curve within a rectangular box. In order to get a better sense of polar curves, please look at -demo_curvelinear_grid.py. +:doc:`/gallery/axisartist/demo_curvelinear_grid`. """ import numpy as np import matplotlib.pyplot as plt diff --git a/examples/color/color_demo.py b/examples/color/color_demo.py index 58c0341247f5..cc9322858917 100644 --- a/examples/color/color_demo.py +++ b/examples/color/color_demo.py @@ -15,7 +15,7 @@ 5) a X11/CSS4 ("html") color name, e.g. ``"blue"``; 6) a name from the `xkcd color survey `__, prefixed with ``'xkcd:'`` (e.g., ``'xkcd:sky blue'``); -7) a "Cn" color spec, i.e. `'C'` followed by a number, which is an index into +7) a "Cn" color spec, i.e. ``'C'`` followed by a number, which is an index into the default property cycle (``matplotlib.rcParams['axes.prop_cycle']``); the indexing is intended to occur at rendering time, and defaults to black if the cycle does not include color. diff --git a/examples/color/custom_cmap.py b/examples/color/custom_cmap.py index 0e55060cfd58..826233124533 100644 --- a/examples/color/custom_cmap.py +++ b/examples/color/custom_cmap.py @@ -9,7 +9,7 @@ Creating a :doc:`colormap ` from a list of colors can be done with the :meth:`~.colors.LinearSegmentedColormap.from_list` method of -`LinearSegmentedColormap`. You must pass a list of RGB tuples that define the +`.LinearSegmentedColormap`. You must pass a list of RGB tuples that define the mixture of colors from 0 to 1. diff --git a/examples/images_contours_and_fields/demo_bboximage.py b/examples/images_contours_and_fields/demo_bboximage.py index 7ea364af4f5d..0c5fec944ba5 100644 --- a/examples/images_contours_and_fields/demo_bboximage.py +++ b/examples/images_contours_and_fields/demo_bboximage.py @@ -5,7 +5,7 @@ A :class:`~matplotlib.image.BboxImage` can be used to position an image according to a bounding box. This demo shows how to -show an image inside a `text.Text`'s bounding box as well as +show an image inside a `.text.Text`'s bounding box as well as how to manually create a bounding box for the image. """ import matplotlib.pyplot as plt diff --git a/examples/images_contours_and_fields/interpolation_methods.py b/examples/images_contours_and_fields/interpolation_methods.py index a63777e1d632..7c7182806cc7 100644 --- a/examples/images_contours_and_fields/interpolation_methods.py +++ b/examples/images_contours_and_fields/interpolation_methods.py @@ -6,7 +6,7 @@ This example displays the difference between interpolation methods for :meth:`~.axes.Axes.imshow`. -If `interpolation` is None, it defaults to the :rc:`image.interpolation` +If *interpolation* is None, it defaults to the :rc:`image.interpolation` (default: ``'nearest'``). If the interpolation is ``'none'``, then no interpolation is performed for the Agg, ps and pdf backends. Other backends will default to ``'antialiased'``. @@ -16,7 +16,7 @@ a small image is scaled up. See :doc:`/gallery/images_contours_and_fields/image_antialiasing` for a -discussion on the default `interpolation="antialiased"` option. +discussion on the default ``interpolation="antialiased"`` option. """ import matplotlib.pyplot as plt diff --git a/examples/lines_bars_and_markers/gradient_bar.py b/examples/lines_bars_and_markers/gradient_bar.py index bde05061e530..7f39267ddf86 100644 --- a/examples/lines_bars_and_markers/gradient_bar.py +++ b/examples/lines_bars_and_markers/gradient_bar.py @@ -13,9 +13,8 @@ lengths of the projections of the corner vectors on *v*. A similar approach can be used to create a gradient background for an axes. -In that case, it is helpful to uses Axes coordinates -(`extent=(0, 1, 0, 1), transform=ax.transAxes`) to be independent of the data -coordinates. +In that case, it is helpful to uses Axes coordinates (``extent=(0, 1, 0, 1), +transform=ax.transAxes``) to be independent of the data coordinates. """ import matplotlib.pyplot as plt diff --git a/examples/misc/bbox_intersect.py b/examples/misc/bbox_intersect.py index 22150ed447ab..e7343fb628ad 100644 --- a/examples/misc/bbox_intersect.py +++ b/examples/misc/bbox_intersect.py @@ -4,7 +4,7 @@ =========================================== The lines intersecting the rectangle are colored in red, while the others -are left as blue lines. This example showcases the `intersect_bbox` function. +are left as blue lines. This example showcases the `.intersects_bbox` function. """ diff --git a/examples/misc/ftface_props.py b/examples/misc/ftface_props.py index 2458addcbca2..b45e2a724114 100644 --- a/examples/misc/ftface_props.py +++ b/examples/misc/ftface_props.py @@ -3,9 +3,9 @@ Font properties =============== -This example lists the attributes of an `FT2Font` object, which describe global -font properties. For individual character metrics, use the `Glyph` object, as -returned by `load_char`. +This example lists the attributes of an `.FT2Font` object, which describe +global font properties. For individual character metrics, use the `.Glyph` +object, as returned by `.load_char`. """ import os diff --git a/examples/misc/multipage_pdf.py b/examples/misc/multipage_pdf.py index b3d40afc19ed..c29cb9b1e9b7 100644 --- a/examples/misc/multipage_pdf.py +++ b/examples/misc/multipage_pdf.py @@ -7,8 +7,8 @@ as well as adding metadata and annotations to pdf files. If you want to use a multipage pdf file using LaTeX, you need -to use `from matplotlib.backends.backend_pgf import PdfPages`. -This version however does not support `attach_note`. +to use ``from matplotlib.backends.backend_pgf import PdfPages``. +This version however does not support `.attach_note`. """ import datetime diff --git a/examples/mplot3d/voxels.py b/examples/mplot3d/voxels.py index ba587519e4d2..778e9aadf1dd 100644 --- a/examples/mplot3d/voxels.py +++ b/examples/mplot3d/voxels.py @@ -3,7 +3,7 @@ 3D voxel / volumetric plot ========================== -Demonstrates plotting 3D volumetric objects with ``ax.voxels`` +Demonstrates plotting 3D volumetric objects with `.Axes3D.voxels`. ''' import matplotlib.pyplot as plt diff --git a/examples/mplot3d/voxels_numpy_logo.py b/examples/mplot3d/voxels_numpy_logo.py index f93731f3447b..b74067a08016 100644 --- a/examples/mplot3d/voxels_numpy_logo.py +++ b/examples/mplot3d/voxels_numpy_logo.py @@ -3,7 +3,7 @@ 3D voxel plot of the numpy logo =============================== -Demonstrates using ``ax.voxels`` with uneven coordinates +Demonstrates using `.Axes3D.voxels` with uneven coordinates. ''' import matplotlib.pyplot as plt import numpy as np diff --git a/examples/mplot3d/voxels_rgb.py b/examples/mplot3d/voxels_rgb.py index a49056f83956..e7fb7fe61c4f 100644 --- a/examples/mplot3d/voxels_rgb.py +++ b/examples/mplot3d/voxels_rgb.py @@ -3,7 +3,7 @@ 3D voxel / volumetric plot with rgb colors ========================================== -Demonstrates using `Axes3D.voxels` to visualize parts of a color space. +Demonstrates using `.Axes3D.voxels` to visualize parts of a color space. """ import matplotlib.pyplot as plt diff --git a/examples/mplot3d/voxels_torus.py b/examples/mplot3d/voxels_torus.py index cdd4fde34752..43c74f64762f 100644 --- a/examples/mplot3d/voxels_torus.py +++ b/examples/mplot3d/voxels_torus.py @@ -3,7 +3,7 @@ 3D voxel / volumetric plot with cylindrical coordinates ======================================================= -Demonstrates using the ``x, y, z`` arguments of ``ax.voxels``. +Demonstrates using the *x*, *y*, *z* arguments of `.Axes3D.voxels`. ''' import matplotlib.pyplot as plt diff --git a/examples/pie_and_polar_charts/nested_pie.py b/examples/pie_and_polar_charts/nested_pie.py index ce2be648f1cb..ed3a88ff582f 100644 --- a/examples/pie_and_polar_charts/nested_pie.py +++ b/examples/pie_and_polar_charts/nested_pie.py @@ -21,8 +21,8 @@ # own group. In the outer circle, we'll plot them as members of their # original 3 groups. # -# The effect of the donut shape is achieved by setting a `width` to -# the pie's wedges through the `wedgeprops` argument. +# The effect of the donut shape is achieved by setting a ``width`` to +# the pie's wedges through the *wedgeprops* argument. fig, ax = plt.subplots() diff --git a/examples/pyplots/align_ylabels.py b/examples/pyplots/align_ylabels.py index 09711eef28aa..d3ef2ced8613 100644 --- a/examples/pyplots/align_ylabels.py +++ b/examples/pyplots/align_ylabels.py @@ -55,8 +55,8 @@ def make_plot(axs): # # # Or we can manually align the axis labels between subplots manually using the -# `set_label_coords` method of the y-axis object. Note this requires we know -# a good offset value which is hardcoded. +# `~.YAxis.set_label_coords` method of the y-axis object. Note this requires +# we know a good offset value which is hardcoded. fig, axs = plt.subplots(2, 2) fig.subplots_adjust(left=0.2, wspace=0.6) diff --git a/examples/pyplots/auto_subplots_adjust.py b/examples/pyplots/auto_subplots_adjust.py index 4283d0dcedf3..3fc58e9394e6 100644 --- a/examples/pyplots/auto_subplots_adjust.py +++ b/examples/pyplots/auto_subplots_adjust.py @@ -8,8 +8,8 @@ :doc:`draw_event`. Note that a similar result would be achieved using `~.Figure.tight_layout` -or `~.Figure.constrained_layout`; this example shows how one could customize -the subplot parameter adjustment. +or `~.Figure.set_constrained_layout`; this example shows how one could +customize the subplot parameter adjustment. """ import matplotlib.pyplot as plt diff --git a/examples/pyplots/pyplot_two_subplots.py b/examples/pyplots/pyplot_two_subplots.py index 8c6453477b21..9a2f1ada246c 100644 --- a/examples/pyplots/pyplot_two_subplots.py +++ b/examples/pyplots/pyplot_two_subplots.py @@ -3,7 +3,7 @@ Pyplot Two Subplots =================== -Create a figure with two subplots with `pyplot.subplot`. +Create a figure with two subplots with `.pyplot.subplot`. """ import numpy as np import matplotlib.pyplot as plt diff --git a/examples/recipes/common_date_problems.py b/examples/recipes/common_date_problems.py index 5ef4fb64fc8d..de0936f3b23d 100644 --- a/examples/recipes/common_date_problems.py +++ b/examples/recipes/common_date_problems.py @@ -24,8 +24,8 @@ '2008-10-13', '2008-10-14'], dtype='datetime64[D]') The dtype of the NumPy record array for the field ``date`` is ``datetime64[D]`` -which means it is a 64-bit `np.datetime64` in 'day' units. While this format is -more portable, Matplotlib cannot plot this format natively yet. We can plot +which means it is a 64-bit `numpy.datetime64` in 'day' units. While this format +is more portable, Matplotlib cannot plot this format natively yet. We can plot this data by changing the dates to `datetime.date` instances instead, which can be achieved by converting to an object array:: diff --git a/examples/recipes/create_subplots.py b/examples/recipes/create_subplots.py index 976f24821637..e3ea0ddfa569 100644 --- a/examples/recipes/create_subplots.py +++ b/examples/recipes/create_subplots.py @@ -21,8 +21,8 @@ ax3 = fig.add_subplot(224, sharex=ax1, sharey=ax1) ############################################################################### -# Fernando Perez has provided a nice top level method to create in -# :func:`~matplotlib.pyplots.subplots` (note the "s" at the end) +# Fernando Perez has provided a nice top level method in +# :func:`~matplotlib.pyplot.subplots` (note the "s" at the end) to create # everything at once, and turn on x and y sharing for the whole bunch. # You can either unpack the axes individually... diff --git a/examples/scales/log_test.py b/examples/scales/log_test.py index 3641a1ac6460..72c04d61aaae 100644 --- a/examples/scales/log_test.py +++ b/examples/scales/log_test.py @@ -4,7 +4,7 @@ ======== This is an example of assigning a log-scale for the x-axis using -`semilogx`. +`~.axes.Axes.semilogx`. """ import matplotlib.pyplot as plt diff --git a/examples/shapes_and_collections/patch_collection.py b/examples/shapes_and_collections/patch_collection.py index 05e343465ffe..1cad70212614 100644 --- a/examples/shapes_and_collections/patch_collection.py +++ b/examples/shapes_and_collections/patch_collection.py @@ -4,7 +4,7 @@ ============================ This example demonstrates how to use -:class:`patch collections<~.collections.PatchCollection>`. +:class:`patch collections <.collections.PatchCollection>`. """ import numpy as np diff --git a/examples/showcase/mandelbrot.py b/examples/showcase/mandelbrot.py index 873e23ef3eb1..67cdfbfb4e7e 100644 --- a/examples/showcase/mandelbrot.py +++ b/examples/showcase/mandelbrot.py @@ -7,7 +7,7 @@ associated with a power normalized colormap (gamma=0.3). Rendering can be further enhanced thanks to shading. -The `maxiter` gives the precision of the computation. `maxiter=200` should +The ``maxiter`` gives the precision of the computation. ``maxiter=200`` should take a few seconds on most modern laptops. """ import numpy as np diff --git a/examples/specialty_plots/mri_demo.py b/examples/specialty_plots/mri_demo.py index 7834a3c9f589..dafd631acaa5 100644 --- a/examples/specialty_plots/mri_demo.py +++ b/examples/specialty_plots/mri_demo.py @@ -4,7 +4,7 @@ === This example illustrates how to read an image (of an MRI) into a NumPy -array, and display it in greyscale using `imshow`. +array, and display it in greyscale using `~.axes.Axes.imshow`. """ import matplotlib.pyplot as plt diff --git a/examples/statistics/errorbar_features.py b/examples/statistics/errorbar_features.py index 1dd68a247009..b0d7c9fc6a41 100644 --- a/examples/statistics/errorbar_features.py +++ b/examples/statistics/errorbar_features.py @@ -4,7 +4,7 @@ ======================================= Errors can be specified as a constant value (as shown in -`errorbar_demo.py`). However, this example demonstrates +:doc:`/gallery/statistics/errorbar`). However, this example demonstrates how they vary by specifying arrays of error values. If the raw ``x`` and ``y`` data have length N, there are two options: diff --git a/examples/statistics/errorbars_and_boxes.py b/examples/statistics/errorbars_and_boxes.py index ca1ee8d329d1..ceca7ee51889 100644 --- a/examples/statistics/errorbars_and_boxes.py +++ b/examples/statistics/errorbars_and_boxes.py @@ -9,8 +9,8 @@ called ``make_error_boxes``. Close inspection of this function will reveal the preferred pattern in writing functions for matplotlib: - 1. an ``Axes`` object is passed directly to the function - 2. the function operates on the `Axes` methods directly, not through + 1. an `~.axes.Axes` object is passed directly to the function + 2. the function operates on the ``Axes`` methods directly, not through the ``pyplot`` interface 3. plotting kwargs that could be abbreviated are spelled out for better code readability in the future (for example we use diff --git a/examples/statistics/hist.py b/examples/statistics/hist.py index b5ff5ad0034b..91069e662452 100644 --- a/examples/statistics/hist.py +++ b/examples/statistics/hist.py @@ -41,7 +41,7 @@ # Updating histogram colors # ------------------------- # -# The histogram method returns (among other things) a `patches` object. This +# The histogram method returns (among other things) a ``patches`` object. This # gives us access to the properties of the objects drawn. Using this, we can # edit the histogram to our liking. Let's change the color of each bar # based on its y value. diff --git a/examples/subplots_axes_and_figures/align_labels_demo.py b/examples/subplots_axes_and_figures/align_labels_demo.py index bd574156a506..4be8081ee1f0 100644 --- a/examples/subplots_axes_and_figures/align_labels_demo.py +++ b/examples/subplots_axes_and_figures/align_labels_demo.py @@ -3,10 +3,10 @@ Aligning Labels =============== -Aligning xlabel and ylabel using `Figure.align_xlabels` and -`Figure.align_ylabels` +Aligning xlabel and ylabel using `.Figure.align_xlabels` and +`.Figure.align_ylabels` -`Figure.align_labels` wraps these two functions. +`.Figure.align_labels` wraps these two functions. Note that the xlabel "XLabel1 1" would normally be much closer to the x-axis, and "YLabel1 0" would be much closer to the y-axis of their diff --git a/examples/subplots_axes_and_figures/secondary_axis.py b/examples/subplots_axes_and_figures/secondary_axis.py index 1291c802184d..83146b88df44 100644 --- a/examples/subplots_axes_and_figures/secondary_axis.py +++ b/examples/subplots_axes_and_figures/secondary_axis.py @@ -5,8 +5,8 @@ Sometimes we want a secondary axis on a plot, for instance to convert radians to degrees on the same plot. We can do this by making a child -axes with only one axis visible via `.Axes.axes.secondary_xaxis` and -`.Axes.axes.secondary_yaxis`. This secondary axis can have a different scale +axes with only one axis visible via `.axes.Axes.secondary_xaxis` and +`.axes.Axes.secondary_yaxis`. This secondary axis can have a different scale than the main axis by providing both a forward and an inverse conversion function in a tuple to the ``functions`` kwarg: """ diff --git a/examples/subplots_axes_and_figures/subplots_demo.py b/examples/subplots_axes_and_figures/subplots_demo.py index 35848e8ebdd5..27a6d1a95c67 100644 --- a/examples/subplots_axes_and_figures/subplots_demo.py +++ b/examples/subplots_axes_and_figures/subplots_demo.py @@ -40,7 +40,7 @@ # The first two optional arguments of `.pyplot.subplots` define the number of # rows and columns of the subplot grid. # -# When stacking in one direction only, the returned `axs` is a 1D numpy array +# When stacking in one direction only, the returned ``axs`` is a 1D numpy array # containing the list of created Axes. fig, axs = plt.subplots(2) @@ -71,7 +71,7 @@ # Stacking subplots in two directions # """"""""""""""""""""""""""""""""""" # -# When stacking in two directions, the returned `axs` is a 2D numpy array. +# When stacking in two directions, the returned ``axs`` is a 2D NumPy array. # # If you have to set parameters for each subplot it's handy to iterate over # all subplots in a 2D grid using ``for ax in axs.flat:``. diff --git a/examples/text_labels_and_annotations/annotation_demo.py b/examples/text_labels_and_annotations/annotation_demo.py index 5476c39d243f..ea0902ef2664 100644 --- a/examples/text_labels_and_annotations/annotation_demo.py +++ b/examples/text_labels_and_annotations/annotation_demo.py @@ -3,10 +3,10 @@ Annotating Plots ================ -The following examples show how it is possible to annotate plots in matplotlib. +The following examples show how it is possible to annotate plots in Matplotlib. This includes highlighting specific points of interest and using various visual tools to call attention to this point. For a more complete and in-depth -description of the annotation and text tools in :mod:`matplotlib`, see the +description of the annotation and text tools in Matplotlib, see the :doc:`tutorial on annotation `. """ @@ -20,11 +20,11 @@ # Specifying text points and annotation points # -------------------------------------------- # -# You must specify an annotation point `xy=(x, y)` to annotate this point. -# additionally, you may specify a text point `xytext=(x, y)` for the -# location of the text for this annotation. Optionally, you can -# specify the coordinate system of `xy` and `xytext` with one of the -# following strings for `xycoords` and `textcoords` (default is 'data'):: +# You must specify an annotation point ``xy=(x, y)`` to annotate this point. +# Additionally, you may specify a text point ``xytext=(x, y)`` for the location +# of the text for this annotation. Optionally, you can specify the coordinate +# system of *xy* and *xytext* with one of the following strings for *xycoords* +# and *textcoords* (default is 'data'):: # # 'figure points' : points from the lower left corner of the figure # 'figure pixels' : pixels from the lower left corner of the figure @@ -100,11 +100,11 @@ # Using multiple coordinate systems and axis types # ------------------------------------------------ # -# You can specify the xypoint and the xytext in different positions and -# coordinate systems, and optionally turn on a connecting line and mark -# the point with a marker. Annotations work on polar axes too. +# You can specify the *xypoint* and the *xytext* in different positions and +# coordinate systems, and optionally turn on a connecting line and mark the +# point with a marker. Annotations work on polar axes too. # -# In the example below, the xy point is in native coordinates (xycoords +# In the example below, the *xy* point is in native coordinates (*xycoords* # defaults to 'data'). For a polar axes, this is in (theta, radius) space. # The text in the example is placed in the fractional figure coordinate system. # Text keyword args like horizontal and vertical alignment are respected. @@ -151,7 +151,7 @@ # Customizing arrow and bubble styles # ----------------------------------- # -# The arrow between xytext and the annotation point, as well as the bubble +# The arrow between *xytext* and the annotation point, as well as the bubble # that covers the annotation text, are highly customizable. Below are a few # parameter options as well as their resulting output. diff --git a/examples/text_labels_and_annotations/demo_text_path.py b/examples/text_labels_and_annotations/demo_text_path.py index efec4c94bfa6..7cc43905bcec 100644 --- a/examples/text_labels_and_annotations/demo_text_path.py +++ b/examples/text_labels_and_annotations/demo_text_path.py @@ -3,7 +3,7 @@ Demo Text Path ============== -Use a text as `Path`. The tool that allows for such conversion is a +Use a text as `.Path`. The tool that allows for such conversion is a `~matplotlib.textpath.TextPath`. The resulting path can be employed e.g. as a clip path for an image. """ diff --git a/examples/text_labels_and_annotations/font_file.py b/examples/text_labels_and_annotations/font_file.py index c32af8d7b3b5..e917abdbc42a 100644 --- a/examples/text_labels_and_annotations/font_file.py +++ b/examples/text_labels_and_annotations/font_file.py @@ -4,7 +4,7 @@ =================================== Although it is usually not a good idea to explicitly point to a single ttf file -for a font instance, you can do so using the `font_manager.FontProperties` +for a font instance, you can do so using the `.font_manager.FontProperties` *fname* argument. Here, we use the Computer Modern roman font (``cmr10``) shipped with diff --git a/examples/ticks_and_spines/major_minor_demo.py b/examples/ticks_and_spines/major_minor_demo.py index 1143bf3ebae7..d73e5fbc0acd 100644 --- a/examples/ticks_and_spines/major_minor_demo.py +++ b/examples/ticks_and_spines/major_minor_demo.py @@ -13,9 +13,9 @@ Minor ticks can be turned on without labels by setting the minor locator. Minor tick labels can be turned on by setting the minor formatter. -`MultipleLocator` places ticks on multiples of some base. `FormatStrFormatter` -uses a format string (e.g., '%d' or '%1.2f' or '%1.1f cm' ) to format the tick -labels. +`.MultipleLocator` places ticks on multiples of some base. +`.FormatStrFormatter` uses a format string (e.g., ``'%d'`` or ``'%1.2f'`` or +``'%1.1f cm'``) to format the tick labels. `.pyplot.grid` changes the grid settings of the major ticks of the y and y axis together. If you want to control the grid of the minor ticks for a given axis, @@ -57,9 +57,9 @@ # be either 4 or 5 minor tick intervals per major interval, depending on the # major interval. # -# One can supply an argument to AutoMinorLocator to specify a fixed number of -# minor intervals per major interval, e.g. ``AutoMinorLocator(2)`` would lead -# to a single minor tick between major ticks. +# One can supply an argument to `.AutoMinorLocator` to specify a fixed number +# of minor intervals per major interval, e.g. ``AutoMinorLocator(2)`` would +# lead to a single minor tick between major ticks. t = np.arange(0.0, 100.0, 0.01) s = np.sin(2 * np.pi * t) * np.exp(-t * 0.01) diff --git a/examples/ticks_and_spines/multiple_yaxis_with_spines.py b/examples/ticks_and_spines/multiple_yaxis_with_spines.py index 19d41f49c212..4eafe13a71fe 100644 --- a/examples/ticks_and_spines/multiple_yaxis_with_spines.py +++ b/examples/ticks_and_spines/multiple_yaxis_with_spines.py @@ -8,7 +8,7 @@ and offset its position using `~.spines.Spine.set_position`. Note that this approach uses `matplotlib.axes.Axes` and their -:class:`Spines<~matplotlib.spines.Spine>`. An alternative approach for parasite +:class:`Spines `. An alternative approach for parasite axes is shown in the :doc:`/gallery/axisartist/demo_parasite_axes` and :doc:`/gallery/axisartist/demo_parasite_axes2` examples. """ diff --git a/examples/ticks_and_spines/scalarformatter.py b/examples/ticks_and_spines/scalarformatter.py index b8e0ca9a419d..061076ef630e 100644 --- a/examples/ticks_and_spines/scalarformatter.py +++ b/examples/ticks_and_spines/scalarformatter.py @@ -3,7 +3,8 @@ The default tick formatter ========================== -The example shows use of the default `ScalarFormatter` with different settings. +The example shows use of the default `.ScalarFormatter` with different +settings. Example 1 : Default diff --git a/examples/units/units_sample.py b/examples/units/units_sample.py index 0b99e2609b78..db39ee73dbe9 100644 --- a/examples/units/units_sample.py +++ b/examples/units/units_sample.py @@ -4,9 +4,9 @@ ====================== The example illustrates the ability to override default x and y units (ax1) to -inches and centimeters using the `xunits` and `yunits` parameters for the -`plot` function. Note that conversions are applied to get numbers to correct -units. +inches and centimeters using the *xunits* and *yunits* parameters for the +`~.axes.Axes.plot` function. Note that conversions are applied to get numbers +to correct units. .. only:: builder_html diff --git a/examples/user_interfaces/svg_histogram_sgskip.py b/examples/user_interfaces/svg_histogram_sgskip.py index b213d7441718..026cb5b1cc03 100644 --- a/examples/user_interfaces/svg_histogram_sgskip.py +++ b/examples/user_interfaces/svg_histogram_sgskip.py @@ -23,7 +23,7 @@ * assigning classes to each SVG object according to its origin. For example, instead of modifying the properties of each individual bar, -the bars from the `hist` function could either be grouped in +the bars from the `~.pyplot.hist` function could either be grouped in a PatchCollection, or be assigned a class="hist_##" attribute. CSS could also be used more extensively to replace repetitive markup diff --git a/examples/user_interfaces/svg_tooltip_sgskip.py b/examples/user_interfaces/svg_tooltip_sgskip.py index 815ce269a9fb..8b8d0c230713 100644 --- a/examples/user_interfaces/svg_tooltip_sgskip.py +++ b/examples/user_interfaces/svg_tooltip_sgskip.py @@ -12,10 +12,10 @@ the tooltip placement and appearance, at the expense of more code up front. -The alternative approach would be to put the tooltip content in `title` +The alternative approach would be to put the tooltip content in ``title`` attributes of SVG objects. Then, using an existing js/CSS library, it would be relatively straightforward to create the tooltip in the -browser. The content would be dictated by the `title` attribute, and +browser. The content would be dictated by the ``title`` attribute, and the appearance by the CSS. diff --git a/examples/userdemo/connect_simple01.py b/examples/userdemo/connect_simple01.py index 20f84e1830b2..5896004a52f2 100644 --- a/examples/userdemo/connect_simple01.py +++ b/examples/userdemo/connect_simple01.py @@ -3,7 +3,7 @@ Connect Simple01 ================ -A `ConnectionPatch` can be used to draw a line (possibly with arrow head) +A `.ConnectionPatch` can be used to draw a line (possibly with arrow head) between points defined in different coordinate systems and/or axes. """ diff --git a/examples/userdemo/demo_gridspec01.py b/examples/userdemo/demo_gridspec01.py index 404fe771b6e7..7153b136f080 100644 --- a/examples/userdemo/demo_gridspec01.py +++ b/examples/userdemo/demo_gridspec01.py @@ -3,9 +3,9 @@ subplot2grid demo ================= -This example demonstrates the use of `plt.subplot2grid` to generate subplots. -Using `GridSpec`, as demonstrated in :doc:`/gallery/userdemo/demo_gridspec03` -is generally preferred. +This example demonstrates the use of `.pyplot.subplot2grid` to generate +subplots. Using `.GridSpec`, as demonstrated in +:doc:`/gallery/userdemo/demo_gridspec03` is generally preferred. """ import matplotlib.pyplot as plt diff --git a/examples/userdemo/demo_gridspec03.py b/examples/userdemo/demo_gridspec03.py index 9dfd5f479f27..2fa3fa58c0fc 100644 --- a/examples/userdemo/demo_gridspec03.py +++ b/examples/userdemo/demo_gridspec03.py @@ -3,7 +3,7 @@ GridSpec demo ============= -This example demonstrates the use of `GridSpec` to generate subplots, +This example demonstrates the use of `.GridSpec` to generate subplots, the control of the relative sizes of subplots with *width_ratios* and *height_ratios*, and the control of the spacing around and between subplots using subplot params (*left*, *right*, *bottom*, *top*, *wspace*, and diff --git a/examples/userdemo/demo_gridspec06.py b/examples/userdemo/demo_gridspec06.py index 6629bb15688c..cc5aa9263221 100644 --- a/examples/userdemo/demo_gridspec06.py +++ b/examples/userdemo/demo_gridspec06.py @@ -3,7 +3,7 @@ Nested GridSpecs ================ -This example demonstrates the use of nested `GridSpec`\s. +This example demonstrates the use of nested `.GridSpec`\s. """ import matplotlib.pyplot as plt