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#
- ogstools.meshplotlib.animation module
- ogstools.meshplotlib.core module
- ogstools.meshplotlib.levels module
- ogstools.meshplotlib.plot_features module
- ogstools.meshplotlib.plot_setup module
PlotSetup
PlotSetup.combined_colorbar
PlotSetup.custom_cmap
PlotSetup.cmap_dict_if_bilinear
PlotSetup.cmap_dict
PlotSetup.cmap_if_mask
PlotSetup.default_cmap
PlotSetup.dpi
PlotSetup.fig_scale
PlotSetup.ax_aspect_limits
PlotSetup.fig_aspect_limits
PlotSetup.invert_colorbar
PlotSetup.layout
PlotSetup.length
PlotSetup.material_names
PlotSetup.num_levels
PlotSetup.num_streamline_interp_pts
PlotSetup.__init__()
PlotSetup.p_max
PlotSetup.p_min
PlotSetup.rcParams
PlotSetup.show_element_edges
PlotSetup.title_center
PlotSetup.title_left
PlotSetup.title_right
PlotSetup.x_label
PlotSetup.y_label
PlotSetup.log_scaled
PlotSetup.show_region_bounds
PlotSetup.embedded_region_names_color
PlotSetup.cmap_str()
PlotSetup.rcParams_scaled
PlotSetup.from_dict()
PlotSetup.reset()
- ogstools.meshplotlib.plot_setup_defaults module