pyvista.PlanesAssembly.label_edge

pyvista.PlanesAssembly.label_edge#

property PlanesAssembly.label_edge: tuple[str, str, str][source]#

Edge on which to position each plane’s label.

Edge can be 'top',``’bottom’,’right’, or ``'left', and can be set independently for each plane or to the same edge for all planes.

The edge is relative to each plane’s local i and j coordinates.

Examples

Position the labels at the top edge and plot.

>>> import pyvista as pv
>>> planes = pv.PlanesAssembly(label_edge='top')
>>> planes.label_edge
('top', 'top', 'top')
>>> pl = pv.Plotter()
>>> _ = pl.add_actor(planes)
>>> planes.camera = pl.camera
>>> pl.show()
../../../_images/pyvista-PlanesAssembly-label_edge-1_00_00.png

Position the labels at the bottom.

>>> planes.label_edge = 'bottom'
>>> pl = pv.Plotter()
>>> _ = pl.add_actor(planes)
>>> planes.camera = pl.camera
>>> pl.show()
../../../_images/pyvista-PlanesAssembly-label_edge-1_01_00.png

Vary the edge of the labels independently for each plane.

>>> planes.label_edge = ('top', 'right', 'left')
>>> pl = pv.Plotter()
>>> _ = pl.add_actor(planes)
>>> planes.camera = pl.camera
>>> pl.show()
../../../_images/pyvista-PlanesAssembly-label_edge-1_02_00.png