ogstools.plot.contourplots_pv module#
3D Plotting functions.
- ogstools.plot.contourplots_pv.contourf_pv(mesh, variable, show_edges=True, opacities=None, lighting=False, categoric=None, **kwargs)[source]#
General 3D plot using pyvista
- Parameters:
mesh (UnstructuredGrid) – The mesh to be plotted with pyvista.
variable (str | Variable) – The variable which should be shown.
show_edges (bool) – If True, draw edges as black lines
opacities (dict[int, float] | None) – Dictionary, mapping opacities to material ids. Default None (all opaque), Example: {1:0.0 # transparent, 2:1 # opaque, 3:0.5} All not provided ids are rendered as opaque.
lighting (bool) – If True, use lighting in the visualization.
categoric (bool | None) – If True, use a categoric colormap. By default it uses the variable to determine if this should be True.
- Returns:
A pyvista Plotter object. Use .show() to display the scene.
- Return type:
Plotter