pyvista.Plotter.generate_orbital_path#

Plotter.generate_orbital_path(factor=3.0, n_points=20, viewup=None, shift=0.0)[source]#

Generate an orbital path around the data scene.

Parameters:
factorfloat, default: 3.0

A scaling factor when building the orbital extent.

n_pointsint, default: 20

Number of points on the orbital path.

viewupsequence[float], optional

The normal to the orbital plane.

shiftfloat, default: 0.0

Shift the plane up/down from the center of the scene by this amount.

Returns:
pyvista.PolyData

PolyData containing the orbital path.

Examples

Generate an orbital path around a sphere.

>>> import pyvista as pv
>>> plotter = pv.Plotter()
>>> _ = plotter.add_mesh(pv.Sphere())
>>> viewup = [0, 0, 1]
>>> orbit = plotter.generate_orbital_path(
...     factor=2.0, n_points=50, shift=0.0, viewup=viewup
... )

See Orbiting for a full example using this method.

https://d33wubrfki0l68.cloudfront.net/5a2b5795df20301c523a894fcac95df645ef0159/2d78b/_images/pyvista-plotter-generate_orbital_path-1_00_00.png