plopp.backends.matplotlib.tiled.Tiled#
- class plopp.backends.matplotlib.tiled.Tiled(nrows, ncols, figsize=None, **kwargs)[source]#
A tiled figure. This is based on Matpotlib’s GridSpec.
Added in version 23.08.0.
- Parameters:
Examples
Create a tiled figure with two plots stacked vertically:
>>> da1 = pp.data.data1d() >>> da2 = pp.data.data2d() >>> tiled = pp.tiled(2, 1) >>> tiled[0] = da1.plot() >>> tiled[1] = da2.plot()
Create a tiled 2x2 figure:
>>> da1 = pp.data.data1d() >>> da2 = pp.data.data2d() >>> da3 = pp.data.data2d() >>> da4 = pp.data.data1d() >>> tiled = pp.tiled(2, 2) >>> tiled[0, 0] = da1.plot() >>> tiled[0, 1] = da2.plot() >>> tiled[1, 0] = da3.plot() >>> tiled[1, 1] = da4.plot()
Create a tiled figure with two figures side by side and the first is twice as wide:
>>> da1 = pp.data.data1d() >>> da2 = pp.data.data2d() >>> tiled = pp.tiled(1, 3) >>> tiled[0, :2] = da1.plot() >>> tiled[0, 2] = da2.plot()
Methods
__init__
(nrows, ncols[, figsize])save
(filename, **kwargs)Save the figure to file.
show
()Make a call to Matplotlib's underlying
show
function.