pelagos_py.utils.fig_spec#

pelagos_py.utils.fig_spec.flag_label(flag)[source]#

Legend label for a QC flag: ‘1 (good)’ when the meaning is known, else ‘6’.

pelagos_py.utils.fig_spec.new_fig(nrows=1, ncols=1, sharex=False, sharey=False, height_ratios=None)[source]#

A standard figure + axes at the standard width/dpi. Axes always 2D: axes[r][c].

Single panel is 16:9; multi-panel grows height by ROW_H per row. height_ratios (e.g. (3, 1)) sets unequal row heights via gridspec.

pelagos_py.utils.fig_spec.style_axes(ax, *, title=None, xlabel=None, ylabel=None)[source]#

The common per-axes look.

pelagos_py.utils.fig_spec.axis_label(var, units=None)[source]#

‘TEMP [degC]’ when units are meaningful, else just the name.

pelagos_py.utils.fig_spec.date_axis(ax, which='x')[source]#

Consistent date formatting on the chosen axis (x or y).

pelagos_py.utils.fig_spec.points(ax, x, y, *, color, label=None, size=MARKER, alpha=ALPHA)[source]#

Standard point series: fast plot() markers, WebGL-safe, one legend entry.

pelagos_py.utils.fig_spec.flag_points(ax, x, y, flags)[source]#

y vs x coloured by QC flag: one series per present flag (0..9).

pelagos_py.utils.fig_spec.legend(ax, *, title=None)[source]#

Compact legend just outside the axes on the right.

pelagos_py.utils.fig_spec.finish(fig, suptitle=None)[source]#

Suptitle + tight layout, the same for every figure.