From 0fb4559b772663b1f1a85d5e62dcc9c6f9d154d5 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 17 Jul 2023 14:29:40 +0200 Subject: [PATCH] More fully qualified argument types --- lib/matplotlib/_constrained_layout.py | 5 +---- lib/matplotlib/_tight_layout.py | 2 +- lib/matplotlib/artist.py | 2 +- lib/matplotlib/axes/_axes.py | 22 +++++++++++----------- lib/matplotlib/axes/_base.py | 6 +++--- lib/matplotlib/backend_bases.py | 2 +- lib/matplotlib/backend_managers.py | 4 ++-- lib/matplotlib/backends/backend_pdf.py | 2 +- lib/matplotlib/backends/backend_pgf.py | 2 +- lib/matplotlib/cm.py | 4 ++-- lib/matplotlib/collections.py | 5 +++-- lib/matplotlib/container.py | 2 +- lib/matplotlib/contour.py | 3 ++- lib/matplotlib/dates.py | 4 ++-- lib/matplotlib/figure.py | 15 +++++++++------ lib/matplotlib/gridspec.py | 6 +++--- lib/matplotlib/image.py | 2 +- lib/matplotlib/layout_engine.py | 4 ++-- lib/matplotlib/legend.py | 2 +- lib/matplotlib/offsetbox.py | 9 +++++---- lib/matplotlib/patches.py | 4 ++-- lib/matplotlib/pyplot.py | 6 +++--- lib/matplotlib/table.py | 4 ++-- lib/matplotlib/text.py | 4 ++-- lib/matplotlib/transforms.py | 4 ++-- lib/matplotlib/widgets.py | 13 ++++++++----- 26 files changed, 72 insertions(+), 66 deletions(-) diff --git a/lib/matplotlib/_constrained_layout.py b/lib/matplotlib/_constrained_layout.py index a562e44a44af..36159bfbd97f 100644 --- a/lib/matplotlib/_constrained_layout.py +++ b/lib/matplotlib/_constrained_layout.py @@ -72,9 +72,6 @@ def do_constrained_layout(fig, h_pad, w_pad, fig : Figure ``Figure`` instance to do the layout in. - renderer : Renderer - Renderer to use. - h_pad, w_pad : float Padding around the axes elements in figure-normalized units. @@ -675,7 +672,7 @@ def reposition_colorbar(layoutgrids, cbax, renderer, *, offset=None): cbax : Axes Axes for the colorbar - renderer : + renderer : `~matplotlib.backend_bases.RendererBase` subclass w_pad, h_pad : float width and height padding (in fraction of figure) hspace, wspace : float diff --git a/lib/matplotlib/_tight_layout.py b/lib/matplotlib/_tight_layout.py index e99ba49bd284..63a7eb22e225 100644 --- a/lib/matplotlib/_tight_layout.py +++ b/lib/matplotlib/_tight_layout.py @@ -202,7 +202,7 @@ def get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, axes_list : list of Axes subplotspec_list : list of `.SubplotSpec` The subplotspecs of each axes. - renderer : renderer + renderer : `~matplotlib.backend_bases.RendererBase` subclass pad : float Padding between the figure edge and the edges of subplots, as a fraction of the font size. diff --git a/lib/matplotlib/artist.py b/lib/matplotlib/artist.py index b54a6cc42094..fac86b627d71 100644 --- a/lib/matplotlib/artist.py +++ b/lib/matplotlib/artist.py @@ -715,7 +715,7 @@ def set_path_effects(self, path_effects): Parameters ---------- - path_effects : `.AbstractPathEffect` + path_effects : `~matplotlib.patheffects.AbstractPathEffect` """ self._path_effects = path_effects self.stale = True diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index a89ccb16611d..44b5c002cb66 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -68,9 +68,9 @@ class Axes(_AxesBase): Attributes ---------- - dataLim : `.Bbox` + dataLim : `~matplotlib.transforms.Bbox` The bounding box enclosing all data displayed in the Axes. - viewLim : `.Bbox` + viewLim : `~matplotlib.transforms.Bbox` The view limits in data coordinates. """ @@ -337,7 +337,7 @@ def inset_axes(self, bounds, *, transform=None, zorder=5, **kwargs): bounds : [x0, y0, width, height] Lower-left corner of inset Axes, and its width and height. - transform : `.Transform` + transform : `~matplotlib.transforms.Transform` Defaults to `ax.transAxes`, i.e. the units of *rect* are in Axes-relative coordinates. @@ -422,7 +422,7 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None, drawn connecting the indicator box to the inset Axes on corners chosen so as to not overlap with the indicator box. - transform : `.Transform` + transform : `~matplotlib.transforms.Transform` Transform for the rectangle coordinates. Defaults to `ax.transAxes`, i.e. the units of *rect* are in Axes-relative coordinates. @@ -447,7 +447,7 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None, Returns ------- - rectangle_patch : `.patches.Rectangle` + rectangle_patch : `~matplotlib.patches.Rectangle` The indicator frame. connector_lines : 4-tuple of `.patches.ConnectionPatch` @@ -533,7 +533,7 @@ def indicate_inset_zoom(self, inset_ax, **kwargs): Returns ------- - rectangle_patch : `.patches.Rectangle` + rectangle_patch : `~matplotlib.patches.Rectangle` Rectangle artist. connector_lines : 4-tuple of `.patches.ConnectionPatch` @@ -1991,7 +1991,7 @@ def acorr(self, x, **kwargs): The lag vector. c : array (length ``2*maxlags+1``) The auto correlation vector. - line : `.LineCollection` or `.Line2D` + line : `~matplotlib.collections.LineCollection` or `~matplotlib.lines.Line2D` `.Artist` added to the Axes of the correlation: - `.LineCollection` if *usevlines* is True. @@ -2068,7 +2068,7 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none, The lag vector. c : array (length ``2*maxlags+1``) The auto correlation vector. - line : `.LineCollection` or `.Line2D` + line : `~matplotlib.collections.LineCollection` or `~matplotlib.lines.Line2D` `.Artist` added to the Axes of the correlation: - `.LineCollection` if *usevlines* is True. @@ -2706,7 +2706,7 @@ def bar_label(self, container, labels=None, *, fmt="%g", label_type="edge", Parameters ---------- - container : `.BarContainer` + container : `~matplotlib.container.BarContainer` Container with all the bars and optionally errorbars, likely returned from `.bar` or `.barh`. @@ -6703,8 +6703,8 @@ def hist(self, x, bins=None, range=None, density=False, weights=None, edge of last bin). Always a single array even when multiple data sets are passed in. - patches : `.BarContainer` or list of a single `.Polygon` or list of \ -such objects + patches : `~matplotlib.container.BarContainer` or list of a single \ +`~matplotlib.patches.Polygon` or list of such objects Container of individual artists used to create the histogram or list of such containers if there are multiple input datasets. diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 498261bb23b3..445c6c452725 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -4143,7 +4143,7 @@ def start_pan(self, x, y, button): ---------- x, y : float The mouse coordinates in display coords. - button : `.MouseButton` + button : `~matplotlib.backend_bases.MouseButton` The pressed mouse button. Notes @@ -4236,7 +4236,7 @@ def drag_pan(self, button, key, x, y): Parameters ---------- - button : `.MouseButton` + button : `~matplotlib.backend_bases.MouseButton` The pressed mouse button. key : str or None The pressed key, if any. @@ -4319,7 +4319,7 @@ def get_tightbbox(self, renderer=None, call_axes_locator=True, Parameters ---------- - renderer : `.RendererBase` subclass + renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional renderer that will be used to draw the figures (i.e. ``fig.canvas.get_renderer()``) diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index ac06eee261dd..7507e3724f31 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -1299,7 +1299,7 @@ class DrawEvent(Event): Attributes ---------- - renderer : `RendererBase` + renderer : `~matplotlib.backend_bases.RendererBase` subclass The renderer for the draw event. """ def __init__(self, name, canvas, renderer): diff --git a/lib/matplotlib/backend_managers.py b/lib/matplotlib/backend_managers.py index 76f15030bcc5..16aa2778e2cc 100644 --- a/lib/matplotlib/backend_managers.py +++ b/lib/matplotlib/backend_managers.py @@ -36,7 +36,7 @@ class ToolManager: Attributes ---------- - figure : `.Figure` + figure : `~matplotlib.figure.Figure` keypresslock : `~matplotlib.widgets.LockDraw` `.LockDraw` object to know if the `canvas` key_press_event is locked. messagelock : `~matplotlib.widgets.LockDraw` @@ -81,7 +81,7 @@ def set_figure(self, figure, update_tools=True): Parameters ---------- - figure : `.Figure` + figure : `~matplotlib.figure.Figure` update_tools : bool, default: True Force tools to update figure. """ diff --git a/lib/matplotlib/backends/backend_pdf.py b/lib/matplotlib/backends/backend_pdf.py index aae5007b55c8..dd58f43c9c0f 100644 --- a/lib/matplotlib/backends/backend_pdf.py +++ b/lib/matplotlib/backends/backend_pdf.py @@ -2733,7 +2733,7 @@ def savefig(self, figure=None, **kwargs): Parameters ---------- - figure : `.Figure` or int, default: the active figure + figure : `~matplotlib.figure.Figure` or int, default: the active figure The figure, or index of the figure, that is saved to the file. """ if not isinstance(figure, Figure): diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py index 82b3e3c65eda..87fd42eb6849 100644 --- a/lib/matplotlib/backends/backend_pgf.py +++ b/lib/matplotlib/backends/backend_pgf.py @@ -969,7 +969,7 @@ def savefig(self, figure=None, **kwargs): Parameters ---------- - figure : `.Figure` or int, default: the active figure + figure : `~matplotlib.figure.Figure` or int, default: the active figure The figure, or index of the figure, that is saved to the file. """ if not isinstance(figure, Figure): diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py index cabfc9e6c425..74f07c5bedd3 100644 --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -394,7 +394,7 @@ def __init__(self, norm=None, cmap=None): """ Parameters ---------- - norm : `.Normalize` (or subclass thereof) or str or None + norm : `~matplotlib.colors.Normalize` (or subclass thereof) or str or None The normalizing object which scales data, typically into the interval ``[0, 1]``. If a `str`, a `.Normalize` subclass is dynamically generated based @@ -640,7 +640,7 @@ def set_norm(self, norm): Parameters ---------- - norm : `.Normalize` or str or None + norm : `~matplotlib.colors.Normalize` or str or None Notes ----- diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index da8f5bc8ce14..a65f51061568 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -126,7 +126,8 @@ def __init__(self, *, A vector by which to translate each patch after rendering (default is no translation). The translation is performed in screen (pixel) coordinates (i.e. after the Artist's transform is applied). - offset_transform : `~.Transform`, default: `.IdentityTransform` + offset_transform : `~matplotlib.transforms.Transform`, default: \ +`.IdentityTransform` A single transform which will be applied to each *offsets* vector before it is used. cmap, norm @@ -228,7 +229,7 @@ def set_offset_transform(self, offset_transform): Parameters ---------- - offset_transform : `.Transform` + offset_transform : `~matplotlib.transforms.Transform` """ self._offset_transform = offset_transform diff --git a/lib/matplotlib/container.py b/lib/matplotlib/container.py index 62fe9a35e666..e11fea391871 100644 --- a/lib/matplotlib/container.py +++ b/lib/matplotlib/container.py @@ -19,7 +19,7 @@ def __new__(cls, *args, **kwargs): def __init__(self, kl, label=None): self._callbacks = cbook.CallbackRegistry(signals=["pchanged"]) self._remove_method = None - self.set_label(label) + self._label = label def remove(self): for c in cbook.flatten( diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index 3f84250b6495..a53c51e5db69 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -568,7 +568,8 @@ def add_label_near(self, x, y, inline=True, inline_spacing=5, Space in pixels to leave on each side of label when placing inline. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours. - transform : `.Transform` or `False`, default: ``self.axes.transData`` + transform : `~matplotlib.transforms.Transform` or `False`, default: \ +``self.axes.transData`` A transform applied to ``(x, y)`` before labeling. The default causes ``(x, y)`` to be interpreted as data coordinates. `False` is a synonym for `.IdentityTransform`; i.e. ``(x, y)`` should be diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 397a6eb55dfd..2cebe3332931 100644 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -667,7 +667,7 @@ class ConciseDateFormatter(ticker.Formatter): Parameters ---------- - locator : `.ticker.Locator` + locator : `~matplotlib.ticker.Locator` Locator that this axis is using. tz : str or `~datetime.tzinfo`, default: :rc:`timezone` @@ -940,7 +940,7 @@ def __init__(self, locator, tz=None, defaultfmt='%Y-%m-%d', *, Parameters ---------- - locator : `.ticker.Locator` + locator : `~matplotlib.ticker.Locator` Locator that this axis is using. tz : str or `~datetime.tzinfo`, default: :rc:`timezone` diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 58798d3780b7..5f8aaa276762 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -1732,7 +1732,7 @@ def get_tightbbox(self, renderer=None, bbox_extra_artists=None): Parameters ---------- - renderer : `.RendererBase` subclass + renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional Renderer that will be used to draw the figures (i.e. ``fig.canvas.get_renderer()``) @@ -2167,7 +2167,7 @@ def __init__(self, parent, subplotspec, *, """ Parameters ---------- - parent : `.Figure` or `.SubFigure` + parent : `~matplotlib.figure.Figure` or `.SubFigure` Figure or subfigure that contains the SubFigure. SubFigures can be nested. @@ -2480,7 +2480,7 @@ def __init__(self, Other Parameters ---------------- - **kwargs : `.Figure` properties, optional + **kwargs : `~matplotlib.figure.Figure` properties, optional %(Figure:kwdoc)s """ @@ -3420,11 +3420,14 @@ def ginput(self, n=1, timeout=30, show_clicks=True, will never time out. show_clicks : bool, default: True If True, show a red cross at the location of each click. - mouse_add : `.MouseButton` or None, default: `.MouseButton.LEFT` + mouse_add : `~matplotlib.backend_bases.MouseButton` or None, default: \ +`.MouseButton.LEFT` Mouse button used to add points. - mouse_pop : `.MouseButton` or None, default: `.MouseButton.RIGHT` + mouse_pop : `~matplotlib.backend_bases.MouseButton` or None, default: \ +`.MouseButton.RIGHT` Mouse button used to remove the most recently added point. - mouse_stop : `.MouseButton` or None, default: `.MouseButton.MIDDLE` + mouse_stop : `~matplotlib.backend_bases.MouseButton` or None, default: \ +`.MouseButton.MIDDLE` Mouse button used to stop input. Returns diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index c86a527ef54a..295ce19db2dc 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -335,7 +335,7 @@ def __init__(self, nrows, ncols, figure=None, nrows, ncols : int The number of rows and columns of the grid. - figure : `.Figure`, optional + figure : `~matplotlib.figure.Figure`, optional Only used for constrained layout to create a proper layoutgrid. left, right, top, bottom : float, optional @@ -448,9 +448,9 @@ def tight_layout(self, figure, renderer=None, Parameters ---------- - figure : `.Figure` + figure : `~matplotlib.figure.Figure` The figure. - renderer : `.RendererBase` subclass, optional + renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional The renderer to be used. pad : float Padding between the figure edge and the edges of subplots, as a diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index 81c28b331c1e..76fa99273b0a 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -67,7 +67,7 @@ def composite_images(images, renderer, magnification=1.0): enforced by this function. Each image must have a purely affine transformation with no shear. - renderer : `.RendererBase` + renderer : `~matplotlib.backend_bases.RendererBase` subclass magnification : float, default: 1 The additional magnification to apply for the renderer in use. diff --git a/lib/matplotlib/layout_engine.py b/lib/matplotlib/layout_engine.py index d751059f4e09..aec4c88bbe26 100644 --- a/lib/matplotlib/layout_engine.py +++ b/lib/matplotlib/layout_engine.py @@ -170,7 +170,7 @@ def execute(self, fig): Parameters ---------- - fig : `.Figure` to perform layout on. + fig : `~matplotlib.figure.Figure` to perform layout on. See Also -------- @@ -263,7 +263,7 @@ def execute(self, fig): Parameters ---------- - fig : `.Figure` to perform layout on. + fig : `~matplotlib.figure.Figure` to perform layout on. """ width, height = fig.get_size_inches() # pads are relative to the current state of the figure... diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py index b71b2bf52123..45405113e642 100644 --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -96,7 +96,7 @@ def _update_bbox_to_anchor(self, loc_in_canvas): _legend_kw_doc_base = """ -bbox_to_anchor : `.BboxBase`, 2-tuple, or 4-tuple of floats +bbox_to_anchor : `~matplotlib.transforms.BboxBase`, 2-tuple, or 4-tuple of floats Box that is used to position the legend in conjunction with *loc*. Defaults to `axes.bbox` (if called as a method to `.Axes.legend`) or `figure.bbox` (if `.Figure.legend`). This argument allows arbitrary diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index 13af941552be..cc0549b7c7af 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -305,8 +305,8 @@ def get_offset(self, bbox, renderer): Parameters ---------- - bbox : `.Bbox` - renderer : `.RendererBase` subclass + bbox : `~matplotlib.transforms.Bbox` + renderer : `~matplotlib.backend_bases.RendererBase` subclass """ return ( self._offset(bbox.width, bbox.height, -bbox.x0, -bbox.y0, renderer) @@ -351,7 +351,7 @@ def _get_bbox_and_child_offsets(self, renderer): Parameters ---------- - renderer : `.RendererBase` subclass + renderer : `~matplotlib.backend_bases.RendererBase` subclass Returns ------- @@ -954,7 +954,8 @@ def __init__(self, loc, *, :rc:`legend.fontsize` is used. frameon : bool Whether to draw a frame around the box. - bbox_to_anchor : `.BboxBase`, 2-tuple, or 4-tuple of floats + bbox_to_anchor : `~matplotlib.transforms.BboxBase`, 2-tuple, or 4-tuple of \ +floats Box that is used to position the legend in conjunction with *loc*. bbox_transform : None or :class:`matplotlib.transforms.Transform` The transform for the bounding box (*bbox_to_anchor*). diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index b89f0e7ddb42..832281bee03b 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -4199,7 +4199,7 @@ def set_patchA(self, patchA): Parameters ---------- - patchA : `.patches.Patch` + patchA : `~matplotlib.patches.Patch` """ self.patchA = patchA self.stale = True @@ -4210,7 +4210,7 @@ def set_patchB(self, patchB): Parameters ---------- - patchB : `.patches.Patch` + patchB : `~matplotlib.patches.Patch` """ self.patchB = patchB self.stale = True diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 99af494c7880..a5c78527eb14 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -1485,7 +1485,7 @@ def subplots( Returns ------- - fig : `.Figure` + fig : `~matplotlib.figure.Figure` ax : `~matplotlib.axes.Axes` or array of Axes *ax* can be either a single `~.axes.Axes` object, or an array of Axes @@ -1669,7 +1669,7 @@ def subplot_mosaic( Returns ------- - fig : `.Figure` + fig : `~matplotlib.figure.Figure` The new figure dict[label, Axes] @@ -1708,7 +1708,7 @@ def subplot2grid( Number of rows for the axis to span downwards. colspan : int, default: 1 Number of columns for the axis to span to the right. - fig : `.Figure`, optional + fig : `~matplotlib.figure.Figure`, optional Figure to place the subplot in. Defaults to the current figure. **kwargs Additional keyword arguments are handed to `~.Figure.add_subplot`. diff --git a/lib/matplotlib/table.py b/lib/matplotlib/table.py index 403c64fdc710..b5edc303919d 100644 --- a/lib/matplotlib/table.py +++ b/lib/matplotlib/table.py @@ -284,7 +284,7 @@ def __init__(self, ax, loc=None, bbox=None, **kwargs): loc : str The position of the cell with respect to *ax*. This must be one of the `~.Table.codes`. - bbox : `.Bbox` or [xmin, ymin, width, height], optional + bbox : `~matplotlib.transforms.Bbox` or [xmin, ymin, width, height], optional A bounding box to draw the table into. If this is not *None*, this overrides *loc*. @@ -711,7 +711,7 @@ def table(ax, The position of the cell with respect to *ax*. This must be one of the `~.Table.codes`. - bbox : `.Bbox` or [xmin, ymin, width, height], optional + bbox : `~matplotlib.transforms.Bbox` or [xmin, ymin, width, height], optional A bounding box to draw the table into. If this is not *None*, this overrides *loc*. diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 19e366b03123..04af7a05c612 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -921,7 +921,7 @@ def get_window_extent(self, renderer=None, dpi=None): Parameters ---------- - renderer : Renderer, optional + renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling `get_window_extent` @@ -1421,7 +1421,7 @@ def __call__(self, renderer): Parameters ---------- - renderer : `RendererBase` + renderer : `~matplotlib.backend_bases.RendererBase` subclass The renderer to use to compute the offset Returns diff --git a/lib/matplotlib/transforms.py b/lib/matplotlib/transforms.py index 7e39807e4c71..a876c8369d44 100644 --- a/lib/matplotlib/transforms.py +++ b/lib/matplotlib/transforms.py @@ -405,7 +405,7 @@ def overlaps(self, other): Parameters ---------- - other : `.BboxBase` + other : `~matplotlib.transforms.BboxBase` """ ax1, ay1, ax2, ay2 = self.extents bx1, by1, bx2, by2 = other.extents @@ -446,7 +446,7 @@ def fully_overlaps(self, other): Parameters ---------- - other : `.BboxBase` + other : `~matplotlib.transforms.BboxBase` """ ax1, ay1, ax2, ay2 = self.extents bx1, by1, bx2, by2 = other.extents diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index d0c88f37bb4d..6309af1b72aa 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -1883,9 +1883,9 @@ def __init__(self, targetfig, toolfig): """ Parameters ---------- - targetfig : `.Figure` + targetfig : `~matplotlib.figure.Figure` The figure instance to adjust. - toolfig : `.Figure` + toolfig : `~matplotlib.figure.Figure` The figure instance to embed the subplot tool into. """ @@ -2584,7 +2584,8 @@ def on_select(min: float, max: float) -> Any Whether to draw a set of handles that allow interaction with the widget after it is drawn. - button : `.MouseButton` or list of `.MouseButton`, default: all buttons + button : `~matplotlib.backend_bases.MouseButton` or list of \ +`~matplotlib.backend_bases.MouseButton`, default: all buttons The mouse buttons which activate the span selector. handle_props : dict, default: None @@ -3170,7 +3171,8 @@ def onselect(eclick: MouseEvent, erelease: MouseEvent) Whether to interpret *minspanx* and *minspany* in data or in pixel coordinates. - button : `.MouseButton`, list of `.MouseButton`, default: all buttons + button : `~matplotlib.backend_bases.MouseButton`, list of \ +`~matplotlib.backend_bases.MouseButton`, default: all buttons Button(s) that trigger rectangle selection. grab_range : float, default: 10 @@ -3781,7 +3783,8 @@ def onselect(verts): props : dict, optional Properties with which the line is drawn, see `matplotlib.lines.Line2D` for valid properties. Default values are defined in ``mpl.rcParams``. - button : `.MouseButton` or list of `.MouseButton`, optional + button : `~matplotlib.backend_bases.MouseButton` or list of \ +`~matplotlib.backend_bases.MouseButton`, optional The mouse buttons used for rectangle selection. Default is ``None``, which corresponds to all buttons. """