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

Appearance settings

Commit 0745d1a

Browse filesBrowse files
committed
[DOC] Documentation fixes
1 parent 4477b11 commit 0745d1a
Copy full SHA for 0745d1a

File tree

Expand file treeCollapse file tree

4 files changed

+79
-13
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+79
-13
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3540,8 +3540,8 @@ def get_xlim(self):
35403540
See Also
35413541
--------
35423542
.Axes.set_xlim
3543-
set_xbound, get_xbound
3544-
invert_xaxis, xaxis_inverted
3543+
.Axes.set_xbound, .Axes.get_xbound
3544+
.Axes.invert_xaxis, .Axes.xaxis_inverted
35453545
35463546
Notes
35473547
-----
@@ -3788,8 +3788,8 @@ def get_ylim(self):
37883788
See Also
37893789
--------
37903790
.Axes.set_ylim
3791-
set_ybound, get_ybound
3792-
invert_yaxis, yaxis_inverted
3791+
.Axes.set_ybound, .Axes.get_ybound
3792+
.Axes.invert_yaxis, .Axes.yaxis_inverted
37933793
37943794
Notes
37953795
-----

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,7 @@ class Affine2DBase(AffineBase):
18251825
affine transformation, use `Affine2D`.
18261826
18271827
Subclasses of this class will generally only need to override a
1828-
constructor and :meth:`get_matrix` that generates a custom 3x3 matrix.
1828+
constructor and `~.Transform.get_matrix` that generates a custom 3x3 matrix.
18291829
"""
18301830
input_dims = 2
18311831
output_dims = 2

‎lib/mpl_toolkits/axes_grid1/axes_size.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/axes_size.py
+14-3Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Provides classes of simple units that will be used with AxesDivider
2+
Provides classes of simple units that will be used with `.AxesDivider`
33
class (or others) to determine the size of each Axes. The unit
44
classes define `get_size` method that returns a tuple of two floats,
55
meaning relative and absolute sizes, respectively.
@@ -25,8 +25,18 @@ def __add__(self, other):
2525
else:
2626
return Add(self, Fixed(other))
2727

28+
def get_size(self, renderer):
29+
"""
30+
Return two-float tuple with relative and absolute sizes.
31+
"""
32+
raise NotImplementedError("Subclasses must implement")
33+
2834

2935
class Add(_Base):
36+
"""
37+
Sum of two sizes.
38+
"""
39+
3040
def __init__(self, a, b):
3141
self._a = a
3242
self._b = b
@@ -198,8 +208,9 @@ def from_any(size, fraction_ref=None):
198208
Fraction unit if that is a string that ends with %. The second
199209
argument is only meaningful when Fraction unit is created.
200210
201-
>>> a = Size.from_any(1.2) # => Size.Fixed(1.2)
202-
>>> Size.from_any("50%", a) # => Size.Fraction(0.5, a)
211+
>>> from mpl_toolkits.axes_grid1.axes_size import from_any
212+
>>> a = from_any(1.2) # => Fixed(1.2)
213+
>>> from_any("50%", a) # => Fraction(0.5, a)
203214
"""
204215
if isinstance(size, Real):
205216
return Fixed(size)

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+60-5Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,25 @@ def get_ylim(self):
719719
return tuple(self.xy_viewLim.intervaly)
720720

721721
def get_zlim(self):
722-
"""Get 3D z limits."""
722+
"""
723+
Return the 3D z-axis view limits.
724+
725+
Returns
726+
-------
727+
left, right : (float, float)
728+
The current z-axis limits in data coordinates.
729+
730+
See Also
731+
--------
732+
set_zlim
733+
set_zbound, get_zbound
734+
invert_zaxis, zaxis_inverted
735+
736+
Notes
737+
-----
738+
The z-axis may be inverted, in which case the *left* value will
739+
be greater than the *right* value.
740+
"""
723741
return tuple(self.zz_viewLim.intervalx)
724742

725743
get_zscale = _axis_method_wrapper("zaxis", "get_scale")
@@ -1475,6 +1493,12 @@ def tick_params(self, axis='both', **kwargs):
14751493
def invert_zaxis(self):
14761494
"""
14771495
Invert the z-axis.
1496+
1497+
See Also
1498+
--------
1499+
zaxis_inverted
1500+
get_zlim, set_zlim
1501+
get_zbound, set_zbound
14781502
"""
14791503
bottom, top = self.get_zlim()
14801504
self.set_zlim(top, bottom, auto=None)
@@ -1484,6 +1508,12 @@ def invert_zaxis(self):
14841508
def get_zbound(self):
14851509
"""
14861510
Return the lower and upper z-axis bounds, in increasing order.
1511+
1512+
See Also
1513+
--------
1514+
set_zbound
1515+
get_zlim, set_zlim
1516+
invert_zaxis, zaxis_inverted
14871517
"""
14881518
bottom, top = self.get_zlim()
14891519
if bottom < top:
@@ -1497,6 +1527,18 @@ def set_zbound(self, lower=None, upper=None):
14971527
14981528
This method will honor axes inversion regardless of parameter order.
14991529
It will not change the autoscaling setting (`.get_autoscalez_on()`).
1530+
1531+
Parameters
1532+
----------
1533+
lower, upper : float or None
1534+
The lower and upper bounds. If *None*, the respective axis bound
1535+
is not modified.
1536+
1537+
See Also
1538+
--------
1539+
get_zbound
1540+
get_zlim, set_zlim
1541+
invert_zaxis, zaxis_inverted
15001542
"""
15011543
if upper is None and np.iterable(lower):
15021544
lower, upper = lower
@@ -1513,11 +1555,24 @@ def set_zbound(self, lower=None, upper=None):
15131555

15141556
def text(self, x, y, z, s, zdir=None, **kwargs):
15151557
"""
1516-
Add text to the plot.
1558+
Add the text *s* to the 3D Axes at location *x*, *y*, *z* in data coordinates.
15171559
1518-
Keyword arguments will be passed on to `.Axes.text`, except for the
1519-
*zdir* keyword, which sets the direction to be used as the z
1520-
direction.
1560+
Parameters
1561+
----------
1562+
x, y, z : float
1563+
The position to place the text.
1564+
s : str
1565+
The text.
1566+
zdir : {'x', 'y', 'z', 3-tuple}, optional
1567+
The direction to be used as the z-direction. Default: 'z'.
1568+
See `.get_dir_vector` for a description of the values.
1569+
**kwargs
1570+
Other arguments are forwarded to `matplotlib.axes.Axes.text`.
1571+
1572+
Returns
1573+
-------
1574+
`.Text3D`
1575+
The created `.Text3D` instance.
15211576
"""
15221577
text = super().text(x, y, s, **kwargs)
15231578
art3d.text_2d_to_3d(text, z, zdir)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.