pyvista.PlanesAssembly.label_position#
- property PlanesAssembly.label_position: tuple[float, float, float][source]#
Normalized relative position of the text labels along the edge of each plane.
Labels are positioned relative to each plane’s respective
label_edge
. The positions are normalized to have a range of[-1.0, 1.0]
such that0.0
is at the center of the edge and-1.0
and1.0
are at the corners.Note
The label text is centered horizontally at the specified positions.
Examples
Position the labels at the center (along the edges) and plot the assembly.
>>> import pyvista as pv >>> planes = pv.PlanesAssembly(label_position=0) >>> planes.label_position (0.0, 0.0, 0.0)
>>> pl = pv.Plotter() >>> _ = pl.add_actor(planes) >>> planes.camera = pl.camera >>> pl.show()
Position the labels at the corners.
>>> planes.label_position = 1.0 >>> pl = pv.Plotter() >>> _ = pl.add_actor(planes) >>> planes.camera = pl.camera >>> pl.show()
Vary the position of the labels independently for each plane. The values may be negative and/or exceed a value of
1.0
.>>> planes.label_position = (-1.3, -1.0, -0.5) >>> pl = pv.Plotter() >>> _ = pl.add_actor(planes) >>> planes.camera = pl.camera >>> pl.show()