From cc21349f967de9866fa4959ccf566cf3b2f99f0e Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 9 Jan 2020 16:30:14 +0100 Subject: [PATCH] And more missing references. The `FormatStrFormatterNewStyle` name added in 04c734c was just wrong (it refers to an old name that went away during the PR review). `{get,format}_pixel_data` were renamed to `{get,format}_cursor_data` during review in cd0e52b. The docstring of violin_stats was edited to remove awkward wording wrt. required keys in dicts; these keys are properly listed in the docstring of bxp() anyways. The comment re: multiline prop_cycles is just plain wrong -- matplotlibrc files never supported any kind of line continuation. --- .../api_changes_3.2.0/behavior.rst | 2 +- doc/missing-references.json | 102 ++---------------- doc/users/dflt_style_changes.rst | 2 +- doc/users/prev_whats_new/whats_new_1.4.rst | 2 +- doc/users/prev_whats_new/whats_new_1.5.rst | 11 +- doc/users/prev_whats_new/whats_new_2.1.0.rst | 6 +- doc/users/prev_whats_new/whats_new_3.1.0.rst | 4 +- lib/matplotlib/artist.py | 4 +- lib/matplotlib/backends/backend_agg.py | 6 +- lib/matplotlib/cbook/__init__.py | 12 +-- lib/matplotlib/figure.py | 4 +- lib/matplotlib/image.py | 6 +- lib/matplotlib/legend.py | 6 +- lib/matplotlib/patches.py | 8 +- lib/matplotlib/pyplot.py | 4 +- lib/mpl_toolkits/mplot3d/axes3d.py | 4 +- 16 files changed, 45 insertions(+), 138 deletions(-) diff --git a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst index 7b863449faf9..e99f3e2c021e 100644 --- a/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst +++ b/doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst @@ -133,7 +133,7 @@ properties, which are `range` objects indicating the whole span of rows and columns covered by the subplot. (Note that all methods and attributes mentioned here actually only exist on -the ``Subplot`` subclass of `Axes`, which is used for grid-positioned Axes but +the ``Subplot`` subclass of `~.axes.Axes`, which is used for grid-positioned Axes but not for Axes positioned directly in absolute coordinates.) The `.GridSpec` class gained the ``nrows`` and ``ncols`` properties as more diff --git a/doc/missing-references.json b/doc/missing-references.json index 8913e4f64950..bd3830894023 100644 --- a/doc/missing-references.json +++ b/doc/missing-references.json @@ -209,12 +209,6 @@ "FigureCanvasQTAgg": [ "doc/api/prev_api_changes/api_changes_2.2.0.rst:215" ], - "LinearSegmentedColormap": [ - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.colormaps:98" - ], - "ListedColormap": [ - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.colormaps:98" - ], "Patch3DCollection": [ "doc/api/toolkits/mplot3d.rst:92::1" ], @@ -341,11 +335,6 @@ "lib/matplotlib/image.py:docstring of matplotlib.image.BboxImage:1", "lib/matplotlib/image.py:docstring of matplotlib.image.FigureImage:1" ], - "matplotlib.patch.Patch": [ - "lib/matplotlib/patches.py:docstring of matplotlib.patches.FancyArrowPatch.set_patchA:8", - "lib/matplotlib/patches.py:docstring of matplotlib.patches.FancyArrowPatch.set_patchB:8", - "lib/matplotlib/patches.py:docstring of matplotlib.patches.FancyArrowPatch:95" - ], "matplotlib.patches.LArrow": [ "lib/matplotlib/patches.py:docstring of matplotlib.patches.BoxStyle.RArrow:1" ], @@ -532,12 +521,6 @@ "matplotlib.axis.Tick.label1On": [ "doc/users/prev_whats_new/whats_new_2.1.0.rst:409" ], - "matplotlib.get_cachedir": [ - "doc/faq/troubleshooting_faq.rst:52" - ], - "matplotlib.get_configdir": [ - "doc/faq/troubleshooting_faq.rst:40" - ], "matplotlib.test": [ "doc/devel/testing.rst:84" ], @@ -609,7 +592,7 @@ "lib/matplotlib/transforms.py:docstring of matplotlib.transforms.Affine2DBase:13" ], "matplotlib.dates.DateFormatter.__call__": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:498" + "doc/users/prev_whats_new/whats_new_1.5.rst:497" ], "matplotlib.dates.MicrosecondLocator.__call__": [ "doc/api/prev_api_changes/api_changes_1.5.0.rst:122" @@ -630,12 +613,6 @@ "mpl_toolkits.axes_grid1.axes_divider.SubPlotDivider": [ "doc/api/prev_api_changes/api_changes_3.0.0.rst:147" ], - "mpl_toolkits.mplot3d.Axes3D.bar3d": [ - "doc/users/prev_whats_new/whats_new_3.1.0.rst:199" - ], - "mpl_toolkits.mplot3d.Axes3D.trisurf": [ - "doc/users/prev_whats_new/whats_new_3.1.0.rst:199" - ], "option_scale_image": [ "lib/matplotlib/backends/backend_cairo.py:docstring of matplotlib.backends.backend_cairo.RendererCairo.draw_image:22", "lib/matplotlib/backends/backend_pdf.py:docstring of matplotlib.backends.backend_pdf.RendererPdf.draw_image:22", @@ -706,9 +683,6 @@ "./gallery/index.html": [ "doc/devel/contributing.rst:540" ], - "Artist.setp": [ - "doc/users/prev_whats_new/whats_new_2.1.0.rst:377" - ], "Artist.sticky_edges": [ "doc/api/axes_api.rst:357::1", "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.use_sticky_edges:2" @@ -725,9 +699,6 @@ "lib/matplotlib/offsetbox.py:docstring of matplotlib.offsetbox.PackerBase:23", "lib/matplotlib/offsetbox.py:docstring of matplotlib.offsetbox.VPacker:44" ], - "Axes": [ - "doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:135" - ], "Axes..set_inverted": [ "doc/users/prev_whats_new/whats_new_3.1.0.rst:247" ], @@ -819,9 +790,6 @@ "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.suptitle:40", "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.suptitle:40" ], - "FormatStrFormatterNewStyle": [ - "doc/users/prev_whats_new/whats_new_1.4.rst:129" - ], "Formatter.__call__": [ "doc/api/prev_api_changes/api_changes_3.1.0.rst:1123", "doc/api/prev_api_changes/api_changes_3.1.0.rst:1129" @@ -891,18 +859,6 @@ "NavigationToolbar2QT.adj_window": [ "doc/api/prev_api_changes/api_changes_3.1.0.rst:969" ], - "PIL.Image.save": [ - "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpeg:29", - "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpg:29", - "lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg.FigureCanvasAgg.print_png:42", - "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.savefig:114", - "lib/matplotlib/image.py:docstring of matplotlib.image.imsave:47", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.imsave:47", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.savefig:114" - ], - "Poly3DCollection": [ - "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.voxels:58" - ], "PolyCollection.get_offset": [ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.hexbin:71", "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:71" @@ -919,9 +875,6 @@ "Quiver.pivot": [ "doc/api/prev_api_changes/api_changes_1.5.0.rst:44" ], - "Returns": [ - "lib/matplotlib/cbook/__init__.py:docstring of matplotlib.cbook.boxplot_stats:2" - ], "Size.from_any": [ "lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:73", "lib/mpl_toolkits/axisartist/axes_grid.py:docstring of mpl_toolkits.axisartist.axes_grid.ImageGrid:48" @@ -955,12 +908,12 @@ "doc/devel/MEP/MEP22.rst:96" ], "ToolContainer": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:616", + "doc/users/prev_whats_new/whats_new_1.5.rst:615", "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.ToolContainerBase.remove_toolitem:2", "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.ToolContainerBase:20" ], "ToolContainers": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:616" + "doc/users/prev_whats_new/whats_new_1.5.rst:615" ], "Toolbar": [ "doc/devel/MEP/MEP22.rst:177", @@ -969,12 +922,12 @@ "doc/devel/MEP/MEP23.rst:46" ], "Toolbars": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:616" + "doc/users/prev_whats_new/whats_new_1.5.rst:615" ], "Tools": [ "doc/devel/MEP/MEP22.rst:40", "doc/devel/MEP/MEP22.rst:56", - "doc/users/prev_whats_new/whats_new_1.5.rst:609" + "doc/users/prev_whats_new/whats_new_1.5.rst:608" ], "_read": [ "lib/matplotlib/dviread.py:docstring of matplotlib.dviread.Vf:20" @@ -1068,25 +1021,6 @@ "barstacked": [ "doc/users/prev_whats_new/whats_new_1.2.rst:177" ], - "bbox_to_anchor": [ - "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.legend:208", - "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.legend:213", - "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.legend:172", - "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.legend:177", - "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:167", - "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:172", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:172", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:177", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:208", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:213" - ], - "bbox_transform": [ - "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.legend:133", - "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.legend:97", - "lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:92", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:97", - "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:133" - ], "bezier.check_if_parallel": [ "doc/api/prev_api_changes/api_changes_3.1.0.rst:801" ], @@ -1193,9 +1127,6 @@ "font.*": [ "doc/users/prev_whats_new/whats_new_1.3.rst:302" ], - "format_pixel_data": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:276" - ], "gaussian_kde": [ "lib/matplotlib/mlab.py:docstring of matplotlib.mlab.GaussianKDE:32" ], @@ -1211,9 +1142,6 @@ "lib/matplotlib/quiver.py:docstring of matplotlib.quiver.QuiverKey.contains:29", "lib/matplotlib/table.py:docstring of matplotlib.table.Table.contains:29" ], - "get_pixel_data": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:276" - ], "get_ps": [ "doc/devel/MEP/MEP14.rst:376" ], @@ -1732,9 +1660,6 @@ "print_xyz": [ "lib/matplotlib/backends/backend_template.py:docstring of matplotlib.backends.backend_template:22" ], - "prop_cycle": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:104" - ], "pylab": [ "doc/api/index.rst:63", "doc/devel/MEP/MEP12.rst:13" @@ -1834,7 +1759,7 @@ "doc/api/prev_api_changes/api_changes_1.4.x.rst:152" ], "to_html5_video": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:729" + "doc/users/prev_whats_new/whats_new_1.5.rst:728" ], "toggled": [ "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.AxisScaleBase.disable:4", @@ -1851,10 +1776,10 @@ "lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.ToolContainerBase.remove_toolitem:6" ], "toolbar": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:616" + "doc/users/prev_whats_new/whats_new_1.5.rst:615" ], "trigger": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:616", + "doc/users/prev_whats_new/whats_new_1.5.rst:615", "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.ToolFullScreen.disable:4", "lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.ToolFullScreen.enable:4" ], @@ -1888,16 +1813,5 @@ "yaxis_inverted": [ "lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d:24" ] - }, - "std:envvar": { - "CC": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:739" - ], - "CXX": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:739" - ], - "PKG_CONFIG": [ - "doc/users/prev_whats_new/whats_new_1.5.rst:739" - ] } } \ No newline at end of file diff --git a/doc/users/dflt_style_changes.rst b/doc/users/dflt_style_changes.rst index a42e663793f0..6fda794bb343 100644 --- a/doc/users/dflt_style_changes.rst +++ b/doc/users/dflt_style_changes.rst @@ -1102,7 +1102,7 @@ Minor ticks on a log axis are now labeled when the axis view limits span a range less than or equal to the interval between two major ticks. See `~matplotlib.ticker.LogFormatter` for details. The minor tick labeling is turned off when using ``mpl.style.use('classic')``, -but cannot be controlled independently via ``rcParams``. +but cannot be controlled independently via `.rcParams`. .. plot:: diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst index 4ec29bf2fdd9..bbf861c06d87 100644 --- a/doc/users/prev_whats_new/whats_new_1.4.rst +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -126,7 +126,7 @@ to create a 2D array from a 1D array. Formatter for new-style formatting strings `````````````````````````````````````````` -Added `.FormatStrFormatterNewStyle` which does the same job as +Added `.StrMethodFormatter` which does the same job as `.FormatStrFormatter`, but accepts new-style formatting strings instead of printf-style formatting strings diff --git a/doc/users/prev_whats_new/whats_new_1.5.rst b/doc/users/prev_whats_new/whats_new_1.5.rst index 89bb2277db48..444060cc3112 100644 --- a/doc/users/prev_whats_new/whats_new_1.5.rst +++ b/doc/users/prev_whats_new/whats_new_1.5.rst @@ -102,8 +102,7 @@ defining property cycles. Adding cyclers together will be like you are axes.prop_cycle: cycler('color', 'rgb') + cycler('lw', [1, 2, 3]) You can even multiply cyclers, which is like using `itertools.product` -on two or more property cycles. Remember to use parentheses if writing -a multi-line `prop_cycle` parameter. +on two or more property cycles. .. figure:: ../../tutorials/intermediate/images/sphx_glr_color_cycle_001.png :target: ../../tutorials/intermediate/color_cycle.html @@ -273,7 +272,7 @@ Adds keyboard modifiers for: Allow Artists to Display Pixel Data in Cursor ````````````````````````````````````````````` -Adds `get_pixel_data` and `format_pixel_data` methods to artists +Adds `~.Artist.get_cursor_data` and `~.Artist.format_cursor_data` methods to artists which can be used to add zdata to the cursor display in the status bar. Also adds an implementation for Images. @@ -737,8 +736,8 @@ Prefixed pkg-config for building -------------------------------- Handling of pkg-config has been fixed in so far as it is now possible to set it -using the environment variable :envvar:`PKG_CONFIG`. This is important if your -toolchain is prefixed. This is done in a simpilar way as setting :envvar:`CC` -or :envvar:`CXX` before building. An example follows. +using the environment variable ``PKG_CONFIG``. This is important if your +toolchain is prefixed. This is done in a simpilar way as setting ``CC`` +or ``CXX`` before building. An example follows. export PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config diff --git a/doc/users/prev_whats_new/whats_new_2.1.0.rst b/doc/users/prev_whats_new/whats_new_2.1.0.rst index ab660fd95b1e..d426be2834cf 100644 --- a/doc/users/prev_whats_new/whats_new_2.1.0.rst +++ b/doc/users/prev_whats_new/whats_new_2.1.0.rst @@ -374,11 +374,11 @@ instance of the Colormap. This implements a way for any Colormap to be reversed. -`.Artist.setp` (and `.pyplot.setp`) accept a ``file`` argument --------------------------------------------------------------- +`.artist.setp` (and `.pyplot.setp`) accept a *file* argument +------------------------------------------------------------ The argument is keyword-only. It allows an output file other than -`sys.stdout` to be specified. It works exactly like the ``file`` argument +`sys.stdout` to be specified. It works exactly like the *file* argument to `print`. diff --git a/doc/users/prev_whats_new/whats_new_3.1.0.rst b/doc/users/prev_whats_new/whats_new_3.1.0.rst index 1df829d09281..2c5f2fd45023 100644 --- a/doc/users/prev_whats_new/whats_new_3.1.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.1.0.rst @@ -199,8 +199,8 @@ an existing Line3D. The `.Axes3D.voxels` method now takes a *shade* parameter that defaults to `True`. This shades faces based on their orientation, behaving just like the matching parameters to -:meth:`~mpl_toolkits.mplot3d.Axes3D.trisurf` and -:meth:`~mpl_toolkits.mplot3d.Axes3D.bar3d`. The plot below shows how +:meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf` and +:meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d`. The plot below shows how this affects the output. .. plot:: diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py index 9d2dd845187a..e5405555e494 100644 --- a/lib/matplotlib/artist.py +++ b/lib/matplotlib/artist.py @@ -738,7 +738,7 @@ def set_clip_path(self, path, transform=None): clipping box to the corresponding rectangle and set the clipping path to ``None``. - For technical reasons (support of ``setp``), a tuple + For technical reasons (support of `~.Artist.set`), a tuple (*path*, *transform*) is also accepted as a single positional parameter. @@ -1478,7 +1478,7 @@ def getp(obj, property=None): The queried artist; e.g., a `.Line2D`, a `.Text`, or an `~.axes.Axes`. property : str or None, default: None - If the *property* is 'somename', this function returns + If *property* is 'somename', this function returns ``obj.get_somename()``. If is is None (or unset), it *prints* all gettable properties from diff --git a/lib/matplotlib/backends/backend_agg.py b/lib/matplotlib/backends/backend_agg.py index 99b32ad4957d..6c5e3ded5f89 100644 --- a/lib/matplotlib/backends/backend_agg.py +++ b/lib/matplotlib/backends/backend_agg.py @@ -491,7 +491,7 @@ def print_png(self, filename_or_obj, *args, https://www.w3.org/TR/2003/REC-PNG-20031110/#11keywords pil_kwargs : dict, optional - Keyword arguments passed to `PIL.Image.save`. + Keyword arguments passed to `PIL.Image.Image.save`. If the 'pnginfo' key is present, it completely overrides *metadata*, including the default 'Software' key. @@ -556,8 +556,8 @@ def print_jpg(self, filename_or_obj, *args, dryrun=False, pil_kwargs=None, pil_kwargs : dict, optional Additional keyword arguments that are passed to - `PIL.Image.save` when saving the figure. These take precedence - over *quality*, *optimize* and *progressive*. + `PIL.Image.Image.save` when saving the figure. These take + precedence over *quality*, *optimize* and *progressive*. """ FigureCanvasAgg.draw(self) if dryrun: diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py index 5a2297c4d127..2d119bb0f836 100644 --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -1095,11 +1095,8 @@ def _combine_masks(*args): def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None, autorange=False): r""" - Return a list of dictionaries of statistics used to draw a series - of box and whisker plots. The `Returns` section enumerates the - required keys of the dictionary. Users can skip this function and - pass a user-defined set of dictionaries to the new `~.Axes.bxp` method - instead of relying on Matplotlib to do the calculations. + Return a list of dictionaries of statistics used to draw a series of box + and whisker plots using `~.Axes.bxp`. Parameters ---------- @@ -1163,8 +1160,8 @@ def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None, Notes ----- - Non-bootstrapping approach to confidence interval uses Gaussian- - based asymptotic approximation: + Non-bootstrapping approach to confidence interval uses Gaussian-based + asymptotic approximation: .. math:: @@ -1173,7 +1170,6 @@ def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None, General approach from: McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of Boxplots", The American Statistician, 32:12-16. - """ def _bootstrap_median(data, N=5000): diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 59731b4552c5..cf5bfe17eab1 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -2144,8 +2144,8 @@ def savefig(self, fname, *, transparent=None, **kwargs): - 'eps' and 'ps' with PS backend: Only 'Creator' is supported. pil_kwargs : dict, optional - Additional keyword arguments that are passed to `PIL.Image.save` - when saving the figure. + Additional keyword arguments that are passed to + `PIL.Image.Image.save` when saving the figure. """ kwargs.setdefault('dpi', rcParams['savefig.dpi']) diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index 5dc422d75826..e86688f8e356 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -1492,9 +1492,9 @@ def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None, format, see the documentation of the respective backends for more information. pil_kwargs : dict, optional - Keyword arguments passed to `PIL.Image.save`. If the 'pnginfo' key is - present, it completely overrides *metadata*, including the default - 'Software' key. + Keyword arguments passed to `PIL.Image.Image.save`. If the 'pnginfo' + key is present, it completely overrides *metadata*, including the + default 'Software' key. """ from matplotlib.figure import Figure if isinstance(fname, os.PathLike): diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py index 45e2c6d9917b..21c7858f9714 100644 --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -143,7 +143,7 @@ def _update_bbox_to_anchor(self, loc_in_canvas): placement of the legend. Bbox coordinates are interpreted in the coordinate system given by - `bbox_transform`, with the default transform + *bbox_transform*, with the default transform Axes or Figure coordinates, depending on which ``legend`` is called. If a 4-tuple or `.BboxBase` is given, then it specifies the bbox @@ -219,11 +219,11 @@ def _update_bbox_to_anchor(self, loc_in_canvas): mode : {"expand", None} If *mode* is set to ``"expand"`` the legend will be horizontally - expanded to fill the axes area (or `bbox_to_anchor` if defines + expanded to fill the axes area (or *bbox_to_anchor* if defines the legend's size). bbox_transform : None or :class:`matplotlib.transforms.Transform` - The transform for the bounding box (`bbox_to_anchor`). For a value + The transform for the bounding box (*bbox_to_anchor*). For a value of ``None`` (default) the Axes' :data:`~matplotlib.axes.Axes.transAxes` transform will be used. diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 66ce8425c937..e0554b8c71d1 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3925,7 +3925,7 @@ def __init__(self, posA=None, posB=None, Ignored. patchA, patchB : `.Patch`, default: None - Head and tail patch respectively. + Head and tail patches, respectively. shrinkA, shrinkB : float, default: 2 Shrinking factor of the tail and head of the arrow respectively. @@ -4044,8 +4044,7 @@ def set_patchA(self, patchA): Parameters ---------- - patchA : Patch - :class:`matplotlib.patch.Patch` instance. + patchA : `.patches.Patch` """ self.patchA = patchA self.stale = True @@ -4056,8 +4055,7 @@ def set_patchB(self, patchB): Parameters ---------- - patchB : Patch - :class:`matplotlib.patch.Patch` instance. + patchB : `.patches.Patch` """ self.patchB = patchB self.stale = True diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index fa7112788927..fd1bcadac511 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1741,8 +1741,8 @@ def colormaps(): ColorBrewer Qualitative: - (For plotting nominal data, :class:`ListedColormap` is used, - not :class:`LinearSegmentedColormap`. Different sets of colors are + (For plotting nominal data, `.ListedColormap` is used, + not `.LinearSegmentedColormap`. Different sets of colors are recommended for different numbers of categories.) * Accent diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index e38622c36b4e..e4579a8d28de 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -2667,13 +2667,13 @@ def voxels(self, *args, facecolors=None, edgecolors=None, shade=True, **kwargs Additional keyword arguments to pass onto - :func:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection` + `~mpl_toolkits.mplot3d.art3d.Poly3DCollection`. Returns ------- faces : dict A dictionary indexed by coordinate, where ``faces[i, j, k]`` is a - `Poly3DCollection` of the faces drawn for the voxel + `.Poly3DCollection` of the faces drawn for the voxel ``filled[i, j, k]``. If no faces were drawn for a given voxel, either because it was not asked to be drawn, or it is fully occluded, then ``(i, j, k) not in faces``.