gdmate.pyvista_vis.pv_plot_2d

gdmate.pyvista_vis.pv_plot_2d(mesh, field, bounds=None, ax=None, colorbar=False, **kwargs)

Plot 2D mesh using Pyvista on a Matplotlib axes.

Parameters:
meshPyvista mesh object

A pyvista mesh object that contains geometrical representations of surface or volume data. The mesh may also have attributes, such as data values assigned to points, cells, or fields assigning various information to the mesh.

fieldstr

The name of the field contained within the Pyvista mesh object to plot.

boundslist of floats or integers

A list of four values that define the bounds by which to clip the plot. Successively, the list of values define the minimum x, maximum x, minimum y, and maximum y bounds. (default: None)

axMatplotlib axes object

Matplotlib axis on which to plot the mesh (default: None)

colorbarbool

Boolean (True or False) for whether to include colorbar (default: False)

Returns:
axMatplotlib axes object

Modified matplotlib axes object with the plotted mesh