@@ -461,9 +461,9 @@ def __init__(self, fig, rect,
461
461
frameon : bool, default: True
462
462
Whether the axes frame is visible.
463
463
464
- box_aspect : None, or a number , optional
465
- Sets the aspect of the axes box. See `~.axes.Axes.set_box_aspect`
466
- for details.
464
+ box_aspect : float , optional
465
+ Set a fixed aspect for the axes box, i.e. the ratio of height to
466
+ width. See `~.axes.Axes.set_box_aspect` for details.
467
467
468
468
**kwargs
469
469
Other optional keyword arguments:
@@ -1422,8 +1422,10 @@ def set_adjustable(self, adjustable, share=False):
1422
1422
1423
1423
def get_box_aspect (self ):
1424
1424
"""
1425
- Get the axes box aspect.
1426
- Will be ``None`` if not explicitly specified.
1425
+ Return the axes box aspect, i.e. the ratio of height to width.
1426
+
1427
+ The box aspect is ``None`` (i.e. chosen depending on the available
1428
+ figure space) unless explicitly specified.
1427
1429
1428
1430
See Also
1429
1431
--------
@@ -1436,19 +1438,21 @@ def get_box_aspect(self):
1436
1438
1437
1439
def set_box_aspect (self , aspect = None ):
1438
1440
"""
1439
- Set the axes box aspect. The box aspect is the ratio of the
1440
- axes height to the axes width in physical units. This is not to be
1441
- confused with the data aspect, set via `~.Axes.set_aspect`.
1441
+ Set the axes box aspect, i.e. the ratio of height to width.
1442
+
1443
+ This defines the aspect of the axes in figure space and is not to be
1444
+ confused with the data aspect (see `~.Axes.set_aspect`).
1442
1445
1443
1446
Parameters
1444
1447
----------
1445
- aspect : None, or a number
1448
+ aspect : float or None
1446
1449
Changes the physical dimensions of the Axes, such that the ratio
1447
1450
of the axes height to the axes width in physical units is equal to
1448
- *aspect*. If *None*, the axes geometry will not be adjusted.
1451
+ *aspect*. Defining a box aspect will change the *adjustable*
1452
+ property to 'datalim' (see `~.Axes.set_adjustable`).
1449
1453
1450
- Note that calling this function with a number changes the *adjustable*
1451
- to *datalim* .
1454
+ *None* will disable a fixed box aspect so that height and width
1455
+ of the axes are chosen independently .
1452
1456
1453
1457
See Also
1454
1458
--------
0 commit comments