PlanesAssembly.label_edge

Contents

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#

Download Python source code | Download Jupyter notebook

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')
../../../_images/pyvista-PlanesAssembly-label_edge-46c677db62245049_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-46c677db62245049_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-46c677db62245049_02_00.png