@@ -1541,24 +1541,32 @@ 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 pass *xmin* or *xmax* as kwargs, i.e.::
1554
1553
1555
- xlim(xmax=3) # adjust the max leaving min unchanged
1556
- xlim(xmin=1) # adjust the min leaving max unchanged
1554
+ xlim(xmax=3) # adjust the max leaving min unchanged
1555
+ xlim(xmin=1) # adjust the min leaving max unchanged
1557
1556
1558
1557
Setting limits turns autoscaling off for the x-axis.
1559
1558
1560
- The new axis limits are returned as a length 2 tuple.
1559
+ Returns
1560
+ -------
1561
+ xmin, xmax
1562
+ A tuple of the new x-axis limits.
1561
1563
1564
+ Notes
1565
+ -----
1566
+ Calling this function with no arguments (e.g. ``xlim()``) is the pyplot
1567
+ equivalent of calling `~.Axes.get_xlim` on the current axes.
1568
+ Calling this function with arguments is the pyplot equivalent of calling
1569
+ `~.Axes.set_xlim` on the current axes. All arguments are passed though.
1562
1570
"""
1563
1571
ax = gca ()
1564
1572
if not args and not kwargs :
@@ -1569,23 +1577,33 @@ def xlim(*args, **kwargs):
1569
1577
1570
1578
def ylim (* args , ** kwargs ):
1571
1579
"""
1572
- Get or set the *y* -limits of the current axes.
1580
+ Get or set the y -limits of the current axes.
1573
1581
1574
- ::
1582
+ Call signatures ::
1575
1583
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
1584
+ ymin, ymax = ylim() # return the current ylim
1585
+ ylim((ymin, ymax)) # set the ylim to ymin, ymax
1586
+ ylim(ymin, ymax) # set the ylim to ymin, ymax
1579
1587
1580
- If you do not specify args, you can pass the *ymin* and *ymax* as
1581
- kwargs, e.g .::
1588
+ If you do not specify args, you can alternatively pass *ymin* or *ymax* as
1589
+ kwargs, i.e .::
1582
1590
1583
- ylim(ymax=3) # adjust the max leaving min unchanged
1584
- ylim(ymin=1) # adjust the min leaving max unchanged
1591
+ ylim(ymax=3) # adjust the max leaving min unchanged
1592
+ ylim(ymin=1) # adjust the min leaving max unchanged
1585
1593
1586
1594
Setting limits turns autoscaling off for the y-axis.
1587
1595
1588
- The new axis limits are returned as a length 2 tuple.
1596
+ Returns
1597
+ -------
1598
+ ymin, ymax
1599
+ A tuple of the new y-axis limits.
1600
+
1601
+ Notes
1602
+ -----
1603
+ Calling this function with no arguments (e.g. ``ylim()``) is the pyplot
1604
+ equivalent of calling `~.Axes.get_ylim` on the current axes.
1605
+ Calling this function with arguments is the pyplot equivalent of calling
1606
+ `~.Axes.set_ylim` on the current axes. All arguments are passed though.
1589
1607
"""
1590
1608
ax = gca ()
1591
1609
if not args and not kwargs :
0 commit comments