pyvista.Plotter.subplot#

Plotter.subplot(index_row, index_column=None)[source]#

Set the active subplot.

Parameters:
index_rowint

Index of the subplot to activate along the rows.

index_columnint, optional

Index of the subplot to activate along the columns.

Examples

Create a 2 wide plot and set the background of right-hand plot to orange. Add a cube to the left plot and a sphere to the right.

>>> import pyvista as pv
>>> pl = pv.Plotter(shape=(1, 2))
>>> actor = pl.add_mesh(pv.Cube())
>>> pl.subplot(0, 1)
>>> actor = pl.add_mesh(pv.Sphere())
>>> pl.set_background('orange', all_renderers=False)
>>> pl.show()
https://d33wubrfki0l68.cloudfront.net/0a9f50c3174009903438b6656c29815145036c67/53296/_images/pyvista-plotter-subplot-1_00_00.png