plotnine.coord_equal
=1, xlim=None, ylim=None, expand=True) coord_equal(ratio
Cartesian coordinates with fixed relationship between x and y scales
Parameters
ratio : float = 1
-
Desired aspect_ratio (:math:
y/x
) of the panel(s). xlim : tuple[float, float] = None
-
Limits for x axis. If None, then they are automatically computed.
ylim : tuple[float, float] = None
-
Limits for y axis. If None, then they are automatically computed.
expand : bool = True
-
If
True
, expand the coordinate axes by some factor. IfFalse
, use the limits from the data.
Notes
To specify aspect ratio of the visual size for the axes use the aspect_ratio
themeable.
'x', 'y')) + theme(aspect_ratio=0.5) ggplot(data, aes(
When changing the aspect_ratio
in either way, the width
of the panel remains constant (as derived from the plotnine.themes.themeable.figure_size
themeable) and the height
is altered to achieve desired ratio.