Skip to content

Commit 60d0c33

Browse files
authoredFeb 5, 2022
Merge pull request matplotlib#22397 from timhoffm/more-axes-capitalization
Axes capitalization in widgets and axes3d
2 parents 789e855 + 1d2cf25 commit 60d0c33

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed
 

‎lib/matplotlib/widgets.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class AxesWidget(Widget):
104104
Attributes
105105
----------
106106
ax : `~matplotlib.axes.Axes`
107-
The parent axes for the widget.
107+
The parent Axes for the widget.
108108
canvas : `~matplotlib.backend_bases.FigureCanvasBase`
109109
The parent figure canvas for the widget.
110110
active : bool
@@ -313,7 +313,7 @@ class Slider(SliderBase):
313313
"""
314314
A slider representing a floating point range.
315315
316-
Create a slider from *valmin* to *valmax* in axes *ax*. For the slider to
316+
Create a slider from *valmin* to *valmax* in Axes *ax*. For the slider to
317317
remain responsive you must maintain a reference to it. Call
318318
:meth:`on_changed` to connect to the slider event.
319319
@@ -591,7 +591,7 @@ class RangeSlider(SliderBase):
591591
max of the range via the *val* attribute as a tuple of (min, max).
592592
593593
Create a slider that defines a range contained within [*valmin*, *valmax*]
594-
in axes *ax*. For the slider to remain responsive you must maintain a
594+
in Axes *ax*. For the slider to remain responsive you must maintain a
595595
reference to it. Call :meth:`on_changed` to connect to the slider event.
596596
597597
Attributes
@@ -948,7 +948,7 @@ class CheckButtons(AxesWidget):
948948
Attributes
949949
----------
950950
ax : `~matplotlib.axes.Axes`
951-
The parent axes for the widget.
951+
The parent Axes for the widget.
952952
labels : list of `.Text`
953953
954954
rectangles : list of `.Rectangle`
@@ -970,7 +970,7 @@ def __init__(self, ax, labels, actives=None):
970970
Parameters
971971
----------
972972
ax : `~matplotlib.axes.Axes`
973-
The parent axes for the widget.
973+
The parent Axes for the widget.
974974
975975
labels : list of str
976976
The labels of the check buttons.
@@ -1101,7 +1101,7 @@ class TextBox(AxesWidget):
11011101
Attributes
11021102
----------
11031103
ax : `~matplotlib.axes.Axes`
1104-
The parent axes for the widget.
1104+
The parent Axes for the widget.
11051105
label : `.Text`
11061106
11071107
color : color
@@ -1378,7 +1378,7 @@ class RadioButtons(AxesWidget):
13781378
Attributes
13791379
----------
13801380
ax : `~matplotlib.axes.Axes`
1381-
The parent axes for the widget.
1381+
The parent Axes for the widget.
13821382
activecolor : color
13831383
The color of the selected button.
13841384
labels : list of `.Text`
@@ -1396,7 +1396,7 @@ def __init__(self, ax, labels, active=0, activecolor='blue'):
13961396
Parameters
13971397
----------
13981398
ax : `~matplotlib.axes.Axes`
1399-
The axes to add the buttons to.
1399+
The Axes to add the buttons to.
14001400
labels : list of str
14011401
The button labels.
14021402
active : int
@@ -1575,7 +1575,7 @@ def _on_reset(self, event):
15751575

15761576
class Cursor(AxesWidget):
15771577
"""
1578-
A crosshair cursor that spans the axes and moves with mouse cursor.
1578+
A crosshair cursor that spans the Axes and moves with mouse cursor.
15791579
15801580
For the cursor to remain responsive you must keep a reference to it.
15811581
@@ -1671,14 +1671,14 @@ def _update(self):
16711671
class MultiCursor(Widget):
16721672
"""
16731673
Provide a vertical (default) and/or horizontal line cursor shared between
1674-
multiple axes.
1674+
multiple Axes.
16751675
16761676
For the cursor to remain responsive you must keep a reference to it.
16771677
16781678
Parameters
16791679
----------
16801680
canvas : `matplotlib.backend_bases.FigureCanvasBase`
1681-
The FigureCanvas that contains all the axes.
1681+
The FigureCanvas that contains all the Axes.
16821682
16831683
axes : list of `matplotlib.axes.Axes`
16841684
The `~.axes.Axes` to attach the cursor to.
@@ -1902,7 +1902,7 @@ def ignore(self, event):
19021902
and event.button not in self.validButtons):
19031903
return True
19041904
# If no button was pressed yet ignore the event if it was out
1905-
# of the axes
1905+
# of the Axes
19061906
if self._eventpress is None:
19071907
return event.inaxes != self.ax
19081908
# If a button was pressed, check if the release-button is the same.
@@ -2590,7 +2590,7 @@ class ToolLineHandles:
25902590
Parameters
25912591
----------
25922592
ax : `matplotlib.axes.Axes`
2593-
Matplotlib axes where tool handles are displayed.
2593+
Matplotlib Axes where tool handles are displayed.
25942594
positions : 1D array
25952595
Positions of handles in data coordinates.
25962596
direction : {"horizontal", "vertical"}
@@ -2698,7 +2698,7 @@ class ToolHandles:
26982698
Parameters
26992699
----------
27002700
ax : `matplotlib.axes.Axes`
2701-
Matplotlib axes where tool handles are displayed.
2701+
Matplotlib Axes where tool handles are displayed.
27022702
x, y : 1D arrays
27032703
Coordinates of control handles.
27042704
marker : str, default: 'o'
@@ -3472,7 +3472,7 @@ class LassoSelector(_SelectorWidget):
34723472
34733473
In contrast to `Lasso`, `LassoSelector` is written with an interface
34743474
similar to `RectangleSelector` and `SpanSelector`, and will continue to
3475-
interact with the axes until disconnected.
3475+
interact with the Axes until disconnected.
34763476
34773477
Example usage::
34783478
@@ -3486,7 +3486,7 @@ def onselect(verts):
34863486
Parameters
34873487
----------
34883488
ax : `~matplotlib.axes.Axes`
3489-
The parent axes for the widget.
3489+
The parent Axes for the widget.
34903490
onselect : function
34913491
Whenever the lasso is released, the *onselect* function is called and
34923492
passed the vertices of the selected path.
@@ -3557,7 +3557,7 @@ class PolygonSelector(_SelectorWidget):
35573557
35583558
- Hold *ctrl* and click and drag a vertex to reposition it before the
35593559
polygon has been completed.
3560-
- Hold the *shift* key and click and drag anywhere in the axes to move
3560+
- Hold the *shift* key and click and drag anywhere in the Axes to move
35613561
all vertices.
35623562
- Press the *esc* key to start a new polygon.
35633563
@@ -3566,7 +3566,7 @@ class PolygonSelector(_SelectorWidget):
35663566
Parameters
35673567
----------
35683568
ax : `~matplotlib.axes.Axes`
3569-
The parent axes for the widget.
3569+
The parent Axes for the widget.
35703570
35713571
onselect : function
35723572
When a polygon is completed or modified after completion,
@@ -3928,7 +3928,7 @@ class Lasso(AxesWidget):
39283928
Parameters
39293929
----------
39303930
ax : `~matplotlib.axes.Axes`
3931-
The parent axes for the widget.
3931+
The parent Axes for the widget.
39323932
xy : (float, float)
39333933
Coordinates of the start of the lasso.
39343934
useblit : bool, default: True

‎lib/mpl_toolkits/mplot3d/axes3d.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"xlim3d": ["xlim"], "ylim3d": ["ylim"], "zlim3d": ["zlim"]})
4646
class Axes3D(Axes):
4747
"""
48-
3D axes object.
48+
3D Axes object.
4949
"""
5050
name = '3d'
5151

@@ -80,7 +80,7 @@ def __init__(
8080
axis. A positive angle spins the camera clockwise, causing the
8181
scene to rotate counter-clockwise.
8282
sharez : Axes3D, optional
83-
Other axes to share z-limits with.
83+
Other Axes to share z-limits with.
8484
proj_type : {'persp', 'ortho'}
8585
The projection type, default 'persp'.
8686
box_aspect : 3-tuple of floats, default: None
@@ -281,7 +281,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
281281
Set the aspect ratios.
282282
283283
Axes 3D does not current support any aspect but 'auto' which fills
284-
the axes with the data limits.
284+
the Axes with the data limits.
285285
286286
To simulate having equal aspect in data space, set the ratio
287287
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):
339339

340340
def set_box_aspect(self, aspect, *, zoom=1):
341341
"""
342-
Set the axes box aspect.
342+
Set the Axes box aspect.
343343
344344
The box aspect is the ratio of height to width in display
345345
units for each face of the box when viewed perpendicular to
@@ -405,7 +405,7 @@ def draw(self, renderer):
405405
# this is duplicated from `axes._base._AxesBase.draw`
406406
# but must be called before any of the artist are drawn as
407407
# it adjusts the view limits and the size of the bounding box
408-
# of the axes
408+
# of the Axes
409409
locator = self.get_axes_locator()
410410
if locator:
411411
pos = locator(self, renderer)
@@ -1091,17 +1091,17 @@ def disable_mouse_rotation(self):
10911091

10921092
def can_zoom(self):
10931093
"""
1094-
Return whether this axes supports the zoom box button functionality.
1094+
Return whether this Axes supports the zoom box button functionality.
10951095
1096-
3D axes objects do not use the zoom box button.
1096+
Axes3D objects do not use the zoom box button.
10971097
"""
10981098
return False
10991099

11001100
def can_pan(self):
11011101
"""
1102-
Return whether this axes supports the pan/zoom button functionality.
1102+
Return whether this Axes supports the pan/zoom button functionality.
11031103
1104-
3D axes objects do not use the pan/zoom button.
1104+
Axes3d objects do not use the pan/zoom button.
11051105
"""
11061106
return False
11071107

0 commit comments

Comments
 (0)
Please sign in to comment.