Plotter.generate_orbital_path#
- Plotter.generate_orbital_path(
- *,
- factor: float = 3.0,
- n_points: int = 20,
- viewup: VectorLikeFloat | None = None,
- shift: float = 0.0,
Generate an orbital path around the data scene.
- Parameters:
- factor
float, default: 3.0 A scaling factor when building the orbital extent.
- n_points
int, default: 20 Number of points on the orbital path.
- viewup
VectorLikeFloat, optional The normal to the orbital plane.
- shift
float, default: 0.0 Shift the plane up/down from the center of the scene by this amount.
- factor
- Returns:
pyvista.PolyDataPolyData containing the orbital path.
Examples#
Download Python source code | Download Jupyter notebook
Generate an orbital path around a sphere.
>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(pv.Sphere())
>>> viewup = [0, 0, 1]
>>> orbit = pl.generate_orbital_path(
... factor=2.0, n_points=50, shift=0.0, viewup=viewup
... )
Used In#
API Examples
Plotter.orbit_on_path(1 use)
Gallery Examples