plotnine.composition.Arrange

Arrange(operands)

Base class for those that create plot compositions

As a user, you will never directly work with this class, except the operators | and / that are powered by subclasses of this class.

Parameters

operands : list[ggplot | Arrange]

The objects to be put together (composed).

See Also

Beside

To arrange plots side by side

Stack

To arrange plots vertically

plot_spacer

To add a blank space between plots

Methods

Name Description
draw Render the arranged plots
save Save a composition as an image file

draw

draw(*, show=False)

Render the arranged plots

Parameters

show : bool = False

Whether to show the plot.

Returns

Figure

Matplotlib figure

save

save(filename, format=None, dpi=None, **kwargs)

Save a composition as an image file

Parameters

filename : str | Path | BytesIO

File name to write the plot to. If not specified, a name

format : str | None = None

Image format to use, automatically extract from file name extension.

dpi : int | None = None

DPI to use for raster graphics. If None, defaults to using the dpi of theme to the first plot.

kwargs

These are ignored. Here to “softly” match the API of ggplot.save().