@@ -1541,24 +1541,31 @@ def ylabel(s, *args, **kwargs):
1541
1541
1542
1542
def xlim (* args , ** kwargs ):
1543
1543
"""
1544
- Get or set the *x* limits of the current axes.
1544
+ Get or set the x limits of the current axes.
1545
1545
1546
- ::
1546
+ Call signatures ::
1547
1547
1548
- xmin, xmax = xlim() # return the current xlim
1549
- xlim( (xmin, xmax) ) # set the xlim to xmin, xmax
1550
- xlim( xmin, xmax ) # set the xlim to xmin, xmax
1548
+ xmin, xmax = xlim() # return the current xlim
1549
+ xlim((xmin, xmax)) # set the xlim to xmin, xmax
1550
+ xlim(xmin, xmax) # set the xlim to xmin, xmax
1551
1551
1552
- If you do not specify args, you can pass the xmin and xmax as
1553
- kwargs, e.g .::
1552
+ If you do not specify args, you can alternatively pass * xmin* or * xmax* as
1553
+ kwargs, i.e .::
1554
1554
1555
- xlim(xmax=3) # adjust the max leaving min unchanged
1556
- xlim(xmin=1) # adjust the min leaving max unchanged
1555
+ xlim(xmax=3) # adjust the max leaving min unchanged
1556
+ xlim(xmin=1) # adjust the min leaving max unchanged
1557
1557
1558
1558
Setting limits turns autoscaling off for the x-axis.
1559
1559
1560
- The new axis limits are returned as a length 2 tuple.
1560
+ Returns
1561
+ -------
1562
+ xmin, xmax
1563
+ A tuple of the new x-axis limits.
1561
1564
1565
+ Notes
1566
+ -----
1567
+ This is just a shortcut for calling `~.Axes.get_xlim` or `~.Axes.set_xlim`
1568
+ on the current axes. All parameters are passed to the latter.
1562
1569
"""
1563
1570
ax = gca ()
1564
1571
if not args and not kwargs :
@@ -1569,23 +1576,31 @@ def xlim(*args, **kwargs):
1569
1576
1570
1577
def ylim (* args , ** kwargs ):
1571
1578
"""
1572
- Get or set the *y* -limits of the current axes.
1579
+ Get or set the y -limits of the current axes.
1573
1580
1574
- ::
1581
+ Call signatures ::
1575
1582
1576
- ymin, ymax = ylim() # return the current ylim
1577
- ylim( (ymin, ymax) ) # set the ylim to ymin, ymax
1578
- ylim( ymin, ymax ) # set the ylim to ymin, ymax
1583
+ ymin, ymax = ylim() # return the current ylim
1584
+ ylim((ymin, ymax)) # set the ylim to ymin, ymax
1585
+ ylim(ymin, ymax) # set the ylim to ymin, ymax
1579
1586
1580
- If you do not specify args, you can pass the *ymin* and *ymax* as
1581
- kwargs, e.g .::
1587
+ If you do not specify args, you can alternatively pass *ymin* or *ymax* as
1588
+ kwargs, i.e .::
1582
1589
1583
- ylim(ymax=3) # adjust the max leaving min unchanged
1584
- ylim(ymin=1) # adjust the min leaving max unchanged
1590
+ ylim(ymax=3) # adjust the max leaving min unchanged
1591
+ ylim(ymin=1) # adjust the min leaving max unchanged
1585
1592
1586
1593
Setting limits turns autoscaling off for the y-axis.
1587
1594
1588
- The new axis limits are returned as a length 2 tuple.
1595
+ Returns
1596
+ -------
1597
+ ymin, ymax
1598
+ A tuple of the new y-axis limits.
1599
+
1600
+ Notes
1601
+ -----
1602
+ This is just a shortcut for calling `~.Axes.get_ylim` or `~.Axes.set_ylim`
1603
+ on the current axes. All parameters are passed to the latter.
1589
1604
"""
1590
1605
ax = gca ()
1591
1606
if not args and not kwargs :
0 commit comments