Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7c7ebe

Browse files
authored
Merge pull request#12248 from meeseeksmachine/auto-backport-of-pr-12237-on-v3.0.x
Backport PR#12237 on branch v3.0.x (Use (float, float) as parameter type for 2D positions in docstrings)
2 parentsfca8625 +09effdb commitf7c7ebe

File tree

5 files changed

+42
-23
lines changed

5 files changed

+42
-23
lines changed

‎lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ def enter_notify_event(self, guiEvent=None, xy=None):
18481848
----------
18491849
guiEvent
18501850
the native UI event that generated the mpl event
1851-
xy :tuple of 2 scalars
1851+
xy :(float, float)
18521852
the coordinate location of the pointer when the canvas is
18531853
entered
18541854

‎lib/matplotlib/offsetbox.py

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,16 @@ def contains(self, mouseevent):
179179

180180
defset_offset(self,xy):
181181
"""
182-
Set the offset
182+
Set the offset.
183183
184-
accepts x, y, tuple, or a callable object.
184+
Parameters
185+
----------
186+
xy : (float, float) or callable
187+
The (x,y) coordinates of the offset in display units.
188+
A callable must have the signature::
189+
190+
def offset(width, height, xdescent, ydescent, renderer)\
191+
-> (float, float)
185192
"""
186193
self._offset=xy
187194
self.stale=True
@@ -602,9 +609,12 @@ def set_transform(self, t):
602609

603610
defset_offset(self,xy):
604611
"""
605-
set offset of the container.
612+
Set the offset of the container.
606613
607-
Accept : tuple of x,y coordinate in display units.
614+
Parameters
615+
----------
616+
xy : (float, float)
617+
The (x,y) coordinates of the offset in display units.
608618
"""
609619
self._offset=xy
610620

@@ -773,9 +783,12 @@ def set_transform(self, t):
773783

774784
defset_offset(self,xy):
775785
"""
776-
set offset of the container.
786+
Set the offset of the container.
777787
778-
Accept : tuple of x,y coordinates in display units.
788+
Parameters
789+
----------
790+
xy : (float, float)
791+
The (x,y) coordinates of the offset in display units.
779792
"""
780793
self._offset=xy
781794

@@ -891,9 +904,12 @@ def set_transform(self, t):
891904

892905
defset_offset(self,xy):
893906
"""
894-
set offset of the container.
907+
Set the offset of the container.
895908
896-
Accept : tuple of x,y coordinate in display units.
909+
Parameters
910+
----------
911+
xy : (float, float)
912+
The (x,y) coordinates of the offset in display units.
897913
"""
898914
self._offset=xy
899915

@@ -1294,9 +1310,12 @@ def get_zoom(self):
12941310

12951311
# def set_offset(self, xy):
12961312
# """
1297-
# set offset of the container.
1298-
1299-
# Accept : tuple of x,y coordinate in display units.
1313+
# Set the offset of the container.
1314+
#
1315+
# Parameters
1316+
# ----------
1317+
# xy : (float, float)
1318+
# The (x,y) coordinates of the offset in display units.
13001319
# """
13011320
# self._offset = xy
13021321

‎lib/matplotlib/patches.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -638,15 +638,15 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):
638638
"""
639639
Parameters
640640
----------
641-
xy: length-2 tuple
641+
xy : (float, float)
642642
The bottom and left rectangle coordinates
643-
width:
643+
width : float
644644
Rectangle width
645-
height:
645+
height : float
646646
Rectangle height
647-
angle: float, optional
647+
angle: float, optional
648648
rotation in degrees anti-clockwise about *xy* (default is 0.0)
649-
fill: bool, optional
649+
fill: bool, optional
650650
Whether to fill the rectangle (default is ``True``)
651651
652652
Notes
@@ -747,7 +747,7 @@ def set_xy(self, xy):
747747
748748
Parameters
749749
----------
750-
xy :2-item sequence
750+
xy :(float, float)
751751
"""
752752
self._x0,self._y0=xy
753753
self._update_x1()
@@ -1419,11 +1419,11 @@ def __init__(self, xy, width, height, angle=0, **kwargs):
14191419
"""
14201420
Parameters
14211421
----------
1422-
xy :tuple of (scalar, scalar)
1422+
xy :(float, float)
14231423
xy coordinates of ellipse centre.
1424-
width :scalar
1424+
width :float
14251425
Total length (diameter) of horizontal axis.
1426-
height :scalar
1426+
height :float
14271427
Total length (diameter) of vertical axis.
14281428
angle : scalar, optional
14291429
Rotation in degrees anti-clockwise.

‎lib/matplotlib/projections/polar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ class _WedgeBbox(mtransforms.Bbox):
762762
763763
Parameters
764764
----------
765-
center :tuple offloat
765+
center :(float,float)
766766
Center of the wedge
767767
viewLim : `~matplotlib.transforms.Bbox`
768768
Bbox determining the boundaries of the wedge

‎lib/matplotlib/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ class Lasso(AxesWidget):
27622762
----------
27632763
ax : `~matplotlib.axes.Axes`
27642764
The parent axes for the widget.
2765-
xy :array
2765+
xy :(float, float)
27662766
Coordinates of the start of the lasso.
27672767
callback : callable
27682768
Whenever the lasso is released, the `callback` function is called and

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp