ibfoamrig.plot.plot_geometry_3d#
- ibfoamrig.plot.plot_geometry_3d(info, *, ax=None, color_by=None, cmap='viridis', colorbar=True, points=True, surface=None, surface_alpha=0.4)[source]#
Plots the interpolation lines in 3D.
Many lines become unreadable in 3D, consider selecting the boundary cells of interest first, e.g. with
InterpolationData.box.- Parameters:
info (InterpolationData) – Interpolation data of the boundary cells to plot.
ax (Axes3D | None) – 3D axes to draw on. If None, a new figure is created.
color_by (str | None) – Column of
info.frameto color the lines by. If None, all lines are grey.cmap (str) – Color map used with
color_by.colorbar (bool) – If True and
color_byis given, adds a color bar.points (bool) – If True, marks the boundary cell centres and interpolation points. Turn off for large selections to keep the interactive figure smooth and the line colors visible.
surface (ndarray[tuple[Any, ...], dtype[float64]] | None) – Triangles with shape
(n, 3, 3)drawn as the body. Only the part inside the plotted region is shown.surface_alpha (float) – Opacity of the surface, from 0 to 1.
- Returns:
The 3D axes drawn on.
- Raises:
TypeError – If
axis not a 3D axes.KeyError – If
color_byis not a column ofinfo.frame.ValueError – If
surfacedoes not have shape(n, 3, 3).
- Return type: