add_point#
- Plot3d.add_point(r, t, p, data=None, /, dataid='Data', **kwargs)#
Add a single point at spherical coordinates \((r, \theta, \phi)\).
- Parameters:
- r, t, p
ArrayLike Point location.
- data
ArrayLike|None, optional Scalar value at this point. Default is
None(solid color).- dataid
str, optional Name for the scalar array. Default is
'Data'.- **kwargs
Additional keyword arguments forwarded to
add_mesh().
- r, t, p
- Returns:
- out
pyvista.Actor The rendered point actor.
- out
- Raises:
ValueErrorIf any of
r,t,phas size greater than 1.
See also
add_points()For rendering point clouds from larger coordinate arrays.
Examples
A single point at \(r = 1.5\,R_\odot\) on the equatorial plane (\(\theta = \pi/2\)) at 90° longitude (\(\phi = \pi/2\)).
>>> from pyvisual import Plot3d >>> from math import pi >>> >>> plotter = Plot3d() >>> plotter.add_sun() >>> plotter.show_axes() >>> plotter.add_point(1.5, pi/2, pi/2) >>> plotter.show()