pysdic.Plotter3D.add_point_cloud#
- Plotter3D.add_point_cloud(point_cloud, *, warp_by=None, color=None, size=None, opacity=None, mask=None, property=None, property_axis=None, property_clim=None, property_cmap=None, property_below_color=None, property_above_color=None, show_bar=False, bar=None, vectors=None, vector_scale=1.0, vector_color=None, show_points_index=False, index_color='black', index_font_size=10)[source]#
Add a point cloud to the plotter (only for \(E \leq 3\), the missing coordinates are set to 0).
Only the finite points (after warping) selected by
maskare displayed.- Parameters:
point_cloud (
pysdic.PointCloud) – The point cloud to display.warp_by (Optional[Union[str, ArrayLike]], optional) – The displacement added to the points: the name of a property of the point cloud or an array, of shape \((N_p, E)\).
color (Optional[Union[str, Tuple[Real, Real, Real]]], optional) – The color of the points: a color name (e.g.
"red"), an RGB tuple or a hex string. Ignored ifpropertyis given.size (Optional[Real], optional) – The size of the points (positive). PyVista default:
5.0.opacity (Optional[Real], optional) – The opacity of the points, between
0.0(transparent) and1.0(opaque). PyVista default:1.0.mask (Optional[ArrayLike], optional) – A boolean array of shape \((N_p,)\), True for the points to display. By default, all the finite points are displayed.
property (Optional[Union[str, ArrayLike]], optional) – The property used to color the points: the name of a property of the point cloud, or an array of shape \((N_p,)\) or \((N_p, A)\) (for all the points,
maskis applied by the plotter).property_axis (Optional[Integral], optional) – The component used to color the points when the property has \(A > 1\) components, in \([0, A)\). By default, the norm of the property vector is used.
property_clim (Optional[Tuple[Real, Real]], optional) – The color limits (min, max). By default, they are set automatically.
property_cmap (Optional[Union[str,
matplotlib.colors.Colormap]], optional) – The colormap (name or object). Matplotlib default:"viridis".property_below_color (Optional[Union[str, Tuple[Real, Real, Real]]], optional) – The color of the values below
property_clim. By default, the first color of the colormap.property_above_color (Optional[Union[str, Tuple[Real, Real, Real]]], optional) – The color of the values above
property_clim. By default, the last color of the colormap.show_bar (bool, optional (default:
False)) – Whether to show the color bar whenpropertyis given.bar (Optional[Dict[str, Any]], optional) – The keyword arguments of
add_scalar_bar()whenshow_baris True.vectors (Optional[Union[str, ArrayLike]], optional) – A vector field drawn as arrows from the displayed points: the name of a property of the point cloud or an array, of shape \((N_p, 3)\) or \((N_p, E)\). The points with non-finite vectors have no arrow.
vector_scale (Union[Real, ArrayLike], optional (default:
1.0)) – The scale factor of the arrows (strictly positive and finite): an arrow has the length of its vector times its scale. A scalar for all the arrows, or a 1D array with one value per row of the vector field (\(N_p\)).vector_color (Optional[Union[str, Tuple[Real, Real, Real]]], optional) – The color of the arrows of the vector fields. Default is set by PyVista.
show_points_index (bool, optional (default:
False)) – Whether to write the index of each displayed point next to it (the index in the point cloud, also with amask).index_color (Optional[Union[str, Tuple[Real, Real, Real]]], optional (default:
"black")) – The color of the indices.index_font_size (Real, optional (default:
10)) – The font size of the indices, in pixels of the screen (strictly positive): the labels keep their size when zooming.
- Raises:
TypeError – If
point_cloudis not apysdic.PointCloud.ValueError – If the point cloud is empty, if \(E > 3\), if an input has a wrong shape, or if no point can be displayed.
IndexError – If
property_axisis out of range.
- Return type:
None