plotnine.coord_flip

coord_flip(xlim=None, ylim=None, expand=True)

Flipped cartesian coordinates

The horizontal becomes vertical, and vertical becomes horizontal. This is primarily useful for converting geoms and statistics which display y conditional on x, to x conditional on y.

Parameters

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. If False, use the limits from the data.