From ced2b51f01eb1744499a697f2ee2626493066c8e Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 7 Apr 2020 16:41:06 +0200 Subject: [PATCH] More missing refs fixes, and associated doc rewordings. --- doc/missing-references.json | 20 -------------------- lib/matplotlib/units.py | 8 ++------ lib/matplotlib/widgets.py | 23 ++++++++++------------- tutorials/introductory/customizing.py | 4 ++-- 4 files changed, 14 insertions(+), 41 deletions(-) diff --git a/doc/missing-references.json b/doc/missing-references.json index 3a33faed67e8..80acaf840b16 100644 --- a/doc/missing-references.json +++ b/doc/missing-references.json @@ -890,9 +890,6 @@ "cbook.warn_deprecated": [ "doc/api/prev_api_changes/api_changes_3.1.0.rst:766" ], - "cbook.warn_deprecated()": [ - "doc/devel/contributing.rst:330" - ], "cleanup": [ "lib/matplotlib/animation.py:docstring of matplotlib.animation.HTMLWriter.setup:19" ], @@ -989,9 +986,6 @@ "levels": [ "doc/api/prev_api_changes/api_changes_3.0.0.rst:197" ], - "lineprops": [ - "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.PolygonSelector:27" - ], "load_char": [ "doc/gallery/misc/ftface_props.rst:16" ], @@ -1012,9 +1006,6 @@ "make_image": [ "lib/matplotlib/image.py:docstring of matplotlib.image.composite_images:9" ], - "markerprops": [ - "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.PolygonSelector:32" - ], "markevery": [ "doc/users/prev_whats_new/whats_new_1.4.rst:212", "doc/users/prev_whats_new/whats_new_1.4.rst:214", @@ -1434,15 +1425,11 @@ "lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.hexbin:125", "lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:125" ], - "onselect": [ - "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.PolygonSelector:19" - ], "pillow.Image.save()": [ "doc/users/prev_whats_new/whats_new_3.1.0.rst:131", "doc/users/prev_whats_new/whats_new_3.1.0.rst:135" ], "plot": [ - "doc/tutorials/introductory/customizing.rst:195", "lib/matplotlib/sphinxext/plot_directive.py:docstring of matplotlib.sphinxext.plot_directive:4" ], "plot_include_source": [ @@ -1540,13 +1527,6 @@ "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" ], - "units.AxisInfo": [ - "lib/matplotlib/units.py:docstring of matplotlib.units.ConversionInterface.axisinfo:2", - "lib/matplotlib/units.py:docstring of matplotlib.units.DecimalConverter.axisinfo:2" - ], - "vertex_select_radius": [ - "lib/matplotlib/widgets.py:docstring of matplotlib.widgets.PolygonSelector:37" - ], "w_pad": [ "lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure.set_constrained_layout:5" ], diff --git a/lib/matplotlib/units.py b/lib/matplotlib/units.py index 034299d38ab5..311764c26be9 100644 --- a/lib/matplotlib/units.py +++ b/lib/matplotlib/units.py @@ -115,16 +115,12 @@ class ConversionInterface: @staticmethod def axisinfo(unit, axis): - """ - Return an `~units.AxisInfo` for the axis with the specified units. - """ + """Return an `.AxisInfo` for the axis with the specified units.""" return None @staticmethod def default_units(x, axis): - """ - Return the default unit for *x* or ``None`` for the given axis. - """ + """Return the default unit for *x* or ``None`` for the given axis.""" return None @staticmethod diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 61a9143a009f..b9a424c81775 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -2502,21 +2502,18 @@ class PolygonSelector(_SelectorWidget): The parent axes for the widget. onselect : function When a polygon is completed or modified after completion, - the `onselect` function is called and passed a list of the vertices as + the *onselect* function is called and passed a list of the vertices as ``(xdata, ydata)`` tuples. useblit : bool, optional - lineprops : dict, optional - The line for the sides of the polygon is drawn with the properties - given by `lineprops`. The default is ``dict(color='k', linestyle='-', - linewidth=2, alpha=0.5)``. - markerprops : dict, optional - The markers for the vertices of the polygon are drawn with the - properties given by `markerprops`. The default is ``dict(marker='o', - markersize=7, mec='k', mfc='k', alpha=0.5)``. - vertex_select_radius : float, optional - A vertex is selected (to complete the polygon or to move a vertex) - if the mouse click is within `vertex_select_radius` pixels of the - vertex. The default radius is 15 pixels. + lineprops : dict, default: \ +``dict(color='k', linestyle='-', linewidth=2, alpha=0.5)``. + Artist properties for the line representing the edges of the polygon. + markerprops : dict, default: \ +``dict(marker='o', markersize=7, mec='k', mfc='k', alpha=0.5)``. + Artist properties for the markers drawn at the vertices of the polygon. + vertex_select_radius : float, default: 15px + A vertex is selected (to complete the polygon or to move a vertex) if + the mouse click is within *vertex_select_radius* pixels of the vertex. Examples -------- diff --git a/tutorials/introductory/customizing.py b/tutorials/introductory/customizing.py index 11f7c5c2dcc0..97baedda6427 100644 --- a/tutorials/introductory/customizing.py +++ b/tutorials/introductory/customizing.py @@ -121,8 +121,8 @@ plt.plot(data) ############################################################################### -# Note, that in order to change the usual `plot` color you have to change the -# *prop_cycle* property of *axes*: +# Note, that in order to change the usual `~.Axes.plot` color you have to +# change the *prop_cycle* property of *axes*: mpl.rcParams['axes.prop_cycle'] = cycler(color=['r', 'g', 'b', 'y']) plt.plot(data) # first color is red