marEx.PlotConfig

class marEx.PlotConfig(title=None, var_units='', issym=False, cmap=None, cperc=None, clim=None, show_colorbar=True, grid_lines=True, grid_labels=False, dimensions=None, coordinates=None, norm=None, plot_IDs=False, extend='both', verbose=None, quiet=None, projection=None, framerate=10)[source]

Bases: object

Configuration class for plot parameters

Parameters:
title

Plot title

Type:

str | None

var_units

Variable units for colorbar label

Type:

str

issym

Whether data is symmetric (centers colormap at 0)

Type:

bool

cmap

Colormap name or ListedColormap object

Type:

str | matplotlib.colors.ListedColormap | None

cperc

Percentile range for automatic color limits [min, max]

Type:

List[int]

clim

Manual color limits (vmin, vmax)

Type:

Tuple[float, float] | None

show_colorbar

Whether to display colorbar

Type:

bool

grid_lines

Whether to display grid lines

Type:

bool

grid_labels

Whether to display grid labels

Type:

bool

dimensions

Mapping of conceptual to actual dimension names

Type:

Dict[str, str]

coordinates

Mapping of conceptual to actual coordinate names

Type:

Dict[str, str]

norm

Custom normalization (BoundaryNorm or Normalize)

Type:

matplotlib.colors.BoundaryNorm | matplotlib.colors.Normalize | None

plot_IDs

Whether to plot object IDs with random colors

Type:

bool

extend

Colorbar extension (‘neither’, ‘both’, ‘min’, ‘max’)

Type:

str

verbose

Enable verbose logging

Type:

bool | None

quiet

Enable quiet logging

Type:

bool | None

projection

Cartopy projection for map plots

Type:

Any | None

framerate

Frames per second for animations (default 10)

Type:

int

__init__(title=None, var_units='', issym=False, cmap=None, cperc=None, clim=None, show_colorbar=True, grid_lines=True, grid_labels=False, dimensions=None, coordinates=None, norm=None, plot_IDs=False, extend='both', verbose=None, quiet=None, projection=None, framerate=10)
Parameters:
Return type:

None

Methods

__init__([title, var_units, issym, cmap, ...])

Attributes

clim

cmap

coordinates

cperc

dimensions

extend

grid_labels

grid_lines

issym

norm

plot_IDs

quiet

show_colorbar

title

var_units

verbose

title: str | None = None
var_units: str = ''
issym: bool = False
cmap: str | ListedColormap | None = None
cperc: List[int] = None
clim: Tuple[float, float] | None = None
show_colorbar: bool = True
grid_lines: bool = True
grid_labels: bool = False
dimensions: Dict[str, str] = None
coordinates: Dict[str, str] = None
norm: BoundaryNorm | Normalize | None = None
plot_IDs: bool = False
extend: str = 'both'
verbose: bool | None = None
quiet: bool | None = None
projection: Any | None = None
framerate: int = 10
__post_init__()[source]

Initialise default values and configure logging.

Return type:

None

__init__(title=None, var_units='', issym=False, cmap=None, cperc=None, clim=None, show_colorbar=True, grid_lines=True, grid_labels=False, dimensions=None, coordinates=None, norm=None, plot_IDs=False, extend='both', verbose=None, quiet=None, projection=None, framerate=10)
Parameters:
Return type:

None