ogstools.plot.plot_setup module#

Plot configuration setup.

class ogstools.plot.plot_setup.PlotSetup[source]#

Bases: object

Configuration class for easy plot adjustments.

Each entry has a default value as listed in ogstools.plot.plot_setup_defaults.

combined_colorbar: bool#

True if all subplots share on colorbar, else each has its own colorbar.

custom_cmap: Any | None#

Custom colormap to use if given

dpi: int#

The resolution (dots per inch) for the figure.

min_ax_aspect: float | None#

Minimum aspect ratio of subplots.

max_ax_aspect: float | None#

Maximum aspect ratio of subplots.

invert_colorbar: bool#

A boolean indicating whether to invert the colorbar.

layout: str#

Layout of the figure

material_names: dict#

A dictionary that maps material names to regions (MaterialIDs).

num_levels: int#

The aimed number of levels / bins of the colorbar. See ogstools.plot.levels

num_streamline_interp_pts: int | None#

The number of interpolation points for streamlines.

vmax: float | None#

The fixed upper limit for the current scale.

__init__(combined_colorbar, custom_cmap, dpi, min_ax_aspect, max_ax_aspect, invert_colorbar, layout, material_names, num_levels, num_streamline_interp_pts, vmax, vmin, show_element_edges, log_scaled, show_region_bounds, tick_pad, tick_length, fontsize, linewidth, label_split)#
vmin: float | None#

The fixed lower limit for the current scale.

show_element_edges: bool | str#

Controls the display of element edges, can be a boolean or ‘str’. In the latter case element edges are always shown for if the name matches the variable data name.

log_scaled: bool#

A boolean indicating whether the scaling should be logarithmic.

show_region_bounds: bool#

Controls the display of region (MaterialIDs) edges.

tick_pad: int#

Padding of tick labels

tick_length: int#

Size of ticks

fontsize: float#

Size for all texts.

linewidth: float#

Thickness of lines.

label_split: int | None#

Split Variable labels if they exceed this value.

classmethod from_dict(obj)[source]#

Create a PlotSetup instance from a dictionary.

Return type:

PlotSetup

reset()[source]#

Reset the plot setup to default values.