Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Axes capitalization in widgets and axes3d #22397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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"}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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::

Expand All @@ -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.
Expand Down Expand Up @@ -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.

Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"xlim3d": ["xlim"], "ylim3d": ["ylim"], "zlim3d": ["zlim"]})
class Axes3D(Axes):
"""
3D axes object.
3D Axes object.
"""
name = '3d'

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down