pyvista_wasm.PointData#
- class pyvista_wasm.PointData#
Bases:
objectDict-like container for point data arrays.
This class provides a dictionary interface for storing named scalar arrays associated with mesh points, mimicking PyVista’s point_data API.
Examples
>>> import pyvista_wasm as pv >>> import numpy as np >>> mesh = pv.Sphere() >>> mesh.point_data['elevation'] = mesh.points[:, 2] >>> 'elevation' in mesh.point_data True
Render with scalar coloring:
>>> plotter = pv.Plotter() >>> _ = plotter.add_mesh(mesh, scalars='elevation', cmap='viridis') >>> plotter.show()
- __init__() None#
Initialize an empty PointData container.
Methods
__init__()Initialize an empty PointData container.
items()Return (name, array) pairs.
keys()Return the names of all arrays.
values()Return all arrays.
- items() list[tuple[str, ndarray]]#
Return (name, array) pairs.
- Returns:
List of (name, array) tuples.
- Return type:
list
- keys() list[str]#
Return the names of all arrays.
- Returns:
List of array names.
- Return type:
list
- values() list[ndarray]#
Return all arrays.
- Returns:
List of arrays.
- Return type:
list