ogstools.meshplotlib package#

meshplotlib utilities for simple access.

ogstools.meshplotlib.plot(meshes, property)[source]#

Plot the property field of meshes with default settings.

The resulting figure adheres to the configurations in meshplotlib.setup. For 2D, the whole domain, for 3D a set of slices is displayed.

Parameters:
  • meshes (list[UnstructuredGrid] | ndarray | UnstructuredGrid) – Singular mesh of 2D numpy array of meshes

  • property (Property | str) – The property field to be visualized on all meshes

Return type:

Figure

ogstools.meshplotlib.plot_on_top(ax, surf, contour, scaling=1.0)[source]#
Parameters:
  • ax (Axes) –

  • surf (DataSet) –

  • contour (Callable[[ndarray], ndarray]) –

  • scaling (float) –

Return type:

None

ogstools.meshplotlib.plot_contour(ax, mesh, style, lw, projection=2)[source]#
Parameters:
  • ax (Axes) –

  • mesh (DataSet) –

  • style (str) –

  • lw (int) –

  • projection (int) –

ogstools.meshplotlib.subplot(mesh, property, ax, levels=None)[source]#

Plot the property field of a mesh on a matplotlib.axis.

In 3D the mesh gets sliced according to slice_type and the origin in the PlotSetup in meshplotlib.setup. Custom levels and a colormap string can be provided.

Parameters:
  • mesh (UnstructuredGrid) –

  • property (Property | str) –

  • ax (Axes) –

  • levels (ndarray | None) –

Return type:

None

Submodules#