add_cursor#
- Plotter.add_cursor(bounds=(- 1.0, 1.0, - 1.0, 1.0, - 1.0, 1.0), focal_point=(0.0, 0.0, 0.0), color=None)[source]#
Add a cursor of a PyVista or VTK dataset to the scene.
- Parameters
- bounds
length
6 sequence Specify the bounds in the format of:
(xmin, xmax, ymin, ymax, zmin, zmax)
Defaults to
(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0)
.- focal_point
list
ortuple
,optional
The focal point of the cursor.
Defaults to
(0.0, 0.0, 0.0)
.- color
color_like
,optional
Either a string, RGB sequence, or hex color string. For one of the following.
color='white'
color='w'
color=[1.0, 1.0, 1.0]
color='#FFFFFF'
- bounds
- Returns
vtk.vtkActor
VTK actor of the 2D cursor.
Examples
>>> import pyvista >>> sphere = pyvista.Sphere() >>> plotter = pyvista.Plotter() >>> _ = plotter.add_mesh(sphere) >>> _ = plotter.add_cursor() >>> plotter.show()