From 1d2cf25a56978817d9170dcd73e0bdc612e45cac Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sat, 5 Feb 2022 00:02:41 +0100 Subject: [PATCH] Axes capitalization in widgets and axes3d --- lib/matplotlib/widgets.py | 38 +++++++++++++++--------------- lib/mpl_toolkits/mplot3d/axes3d.py | 18 +++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index 32d1cf37b711..16e03f5624e1 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -104,7 +104,7 @@ class AxesWidget(Widget): Attributes ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. canvas : `~matplotlib.backend_bases.FigureCanvasBase` The parent figure canvas for the widget. active : bool @@ -313,7 +313,7 @@ class Slider(SliderBase): """ A slider representing a floating point range. - Create a slider from *valmin* to *valmax* in axes *ax*. For the slider to + Create a slider from *valmin* to *valmax* in Axes *ax*. For the slider to remain responsive you must maintain a reference to it. Call :meth:`on_changed` to connect to the slider event. @@ -591,7 +591,7 @@ class RangeSlider(SliderBase): max of the range via the *val* attribute as a tuple of (min, max). Create a slider that defines a range contained within [*valmin*, *valmax*] - in axes *ax*. For the slider to remain responsive you must maintain a + in Axes *ax*. For the slider to remain responsive you must maintain a reference to it. Call :meth:`on_changed` to connect to the slider event. Attributes @@ -948,7 +948,7 @@ class CheckButtons(AxesWidget): Attributes ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. labels : list of `.Text` rectangles : list of `.Rectangle` @@ -970,7 +970,7 @@ def __init__(self, ax, labels, actives=None): Parameters ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. labels : list of str The labels of the check buttons. @@ -1101,7 +1101,7 @@ class TextBox(AxesWidget): Attributes ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. label : `.Text` color : color @@ -1378,7 +1378,7 @@ class RadioButtons(AxesWidget): Attributes ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. activecolor : color The color of the selected button. labels : list of `.Text` @@ -1396,7 +1396,7 @@ def __init__(self, ax, labels, active=0, activecolor='blue'): Parameters ---------- ax : `~matplotlib.axes.Axes` - The axes to add the buttons to. + The Axes to add the buttons to. labels : list of str The button labels. active : int @@ -1575,7 +1575,7 @@ def _on_reset(self, event): class Cursor(AxesWidget): """ - A crosshair cursor that spans the axes and moves with mouse cursor. + A crosshair cursor that spans the Axes and moves with mouse cursor. For the cursor to remain responsive you must keep a reference to it. @@ -1671,14 +1671,14 @@ def _update(self): class MultiCursor(Widget): """ Provide a vertical (default) and/or horizontal line cursor shared between - multiple axes. + multiple Axes. For the cursor to remain responsive you must keep a reference to it. Parameters ---------- canvas : `matplotlib.backend_bases.FigureCanvasBase` - The FigureCanvas that contains all the axes. + The FigureCanvas that contains all the Axes. axes : list of `matplotlib.axes.Axes` The `~.axes.Axes` to attach the cursor to. @@ -1902,7 +1902,7 @@ def ignore(self, event): and event.button not in self.validButtons): return True # If no button was pressed yet ignore the event if it was out - # of the axes + # of the Axes if self._eventpress is None: return event.inaxes != self.ax # If a button was pressed, check if the release-button is the same. @@ -2590,7 +2590,7 @@ class ToolLineHandles: Parameters ---------- ax : `matplotlib.axes.Axes` - Matplotlib axes where tool handles are displayed. + Matplotlib Axes where tool handles are displayed. positions : 1D array Positions of handles in data coordinates. direction : {"horizontal", "vertical"} @@ -2698,7 +2698,7 @@ class ToolHandles: Parameters ---------- ax : `matplotlib.axes.Axes` - Matplotlib axes where tool handles are displayed. + Matplotlib Axes where tool handles are displayed. x, y : 1D arrays Coordinates of control handles. marker : str, default: 'o' @@ -3472,7 +3472,7 @@ class LassoSelector(_SelectorWidget): In contrast to `Lasso`, `LassoSelector` is written with an interface similar to `RectangleSelector` and `SpanSelector`, and will continue to - interact with the axes until disconnected. + interact with the Axes until disconnected. Example usage:: @@ -3486,7 +3486,7 @@ def onselect(verts): Parameters ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. onselect : function Whenever the lasso is released, the *onselect* function is called and passed the vertices of the selected path. @@ -3557,7 +3557,7 @@ class PolygonSelector(_SelectorWidget): - Hold *ctrl* and click and drag a vertex to reposition it before the polygon has been completed. - - Hold the *shift* key and click and drag anywhere in the axes to move + - Hold the *shift* key and click and drag anywhere in the Axes to move all vertices. - Press the *esc* key to start a new polygon. @@ -3566,7 +3566,7 @@ class PolygonSelector(_SelectorWidget): Parameters ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. onselect : function When a polygon is completed or modified after completion, @@ -3928,7 +3928,7 @@ class Lasso(AxesWidget): Parameters ---------- ax : `~matplotlib.axes.Axes` - The parent axes for the widget. + The parent Axes for the widget. xy : (float, float) Coordinates of the start of the lasso. useblit : bool, default: True diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index 2d046bf1ae96..9daf7ccdc79b 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -45,7 +45,7 @@ "xlim3d": ["xlim"], "ylim3d": ["ylim"], "zlim3d": ["zlim"]}) class Axes3D(Axes): """ - 3D axes object. + 3D Axes object. """ name = '3d' @@ -80,7 +80,7 @@ def __init__( axis. A positive angle spins the camera clockwise, causing the scene to rotate counter-clockwise. sharez : Axes3D, optional - Other axes to share z-limits with. + Other Axes to share z-limits with. proj_type : {'persp', 'ortho'} The projection type, default 'persp'. box_aspect : 3-tuple of floats, default: None @@ -281,7 +281,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False): Set the aspect ratios. Axes 3D does not current support any aspect but 'auto' which fills - the axes with the data limits. + the Axes with the data limits. To simulate having equal aspect in data space, set the ratio of your data limits to match the value of `.get_box_aspect`. @@ -339,7 +339,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False): def set_box_aspect(self, aspect, *, zoom=1): """ - Set the axes box aspect. + Set the Axes box aspect. The box aspect is the ratio of height to width in display units for each face of the box when viewed perpendicular to @@ -405,7 +405,7 @@ def draw(self, renderer): # this is duplicated from `axes._base._AxesBase.draw` # but must be called before any of the artist are drawn as # it adjusts the view limits and the size of the bounding box - # of the axes + # of the Axes locator = self.get_axes_locator() if locator: pos = locator(self, renderer) @@ -1121,17 +1121,17 @@ def disable_mouse_rotation(self): def can_zoom(self): """ - Return whether this axes supports the zoom box button functionality. + Return whether this Axes supports the zoom box button functionality. - 3D axes objects do not use the zoom box button. + Axes3D objects do not use the zoom box button. """ return False def can_pan(self): """ - Return whether this axes supports the pan/zoom button functionality. + Return whether this Axes supports the pan/zoom button functionality. - 3D axes objects do not use the pan/zoom button. + Axes3d objects do not use the pan/zoom button. """ return False