add_spline#
- Plot3d.add_spline(
- *args,
- iframe='rtp',
- oframe='xyz',
- forder=True,
- v_name=None,
- **kwargs,
Add a single polyline spline from stack-style coordinates.
Expects 1D coordinate arrays representing a single spline/trajectory of length
spline_len. The points are stacked into an(spline_len, 3)array and passed topyvista.Spline.- Parameters:
- *args
(sx, sy, sz)or(sx, sy, sz, values). Coordinates must be 1D. If values are provided, they are attached to the spline mesh underv_name.- iframe, oframe{“rtp”, “xyz”}, optional
Input/output coordinate frames.
- forderbool, optional
Present for symmetry; stack conversion does not currently use forder.
- v_name
strorNone, optional Name for attached scalar data if values are provided.
- **kwargs
Forwarded to
add_mesh()(with defaults merged byparse_grid()).
- Returns:
AnyWhatever
pyvista.Plotter.add_points()returns.
- Raises:
ValueErrorIf coordinate arrays are not 1D.