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.categories(da)[source]#
[(value, meaning, colour)]for a variable with CFflag_values, else None.
- pelagos_py.utils.fig_spec.thin_idx(n, cap=None)[source]#
Indices evenly thinning
npoints tocap(default MAX_POINTS); arange(n) if under the cap.
- pelagos_py.utils.fig_spec.new_fig(nrows=1, ncols=1, sharex=False, sharey=False, height_ratios=None, width_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_Hper row.height_ratios/width_ratios(e.g.(3, 1)) set unequal panel sizes 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', index=None)[source]#
Consistent date formatting on the chosen axis (x or y).
index(the full TIME array) also adds an N_MEASUREMENTS axis along the top.
- pelagos_py.utils.fig_spec.x_time(data)[source]#
What a whole-dataset series is plotted against: TIME if present, else N_MEASUREMENTS.
- pelagos_py.utils.fig_spec.x_axis(ax, x)[source]#
Label the x axis for an
x_timearray: TIME below + N_MEASUREMENTS on top, or Index.
- 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.
- pelagos_py.utils.fig_spec.land_polygons(resolution='110m')[source]#
Natural Earth land as one shapely geometry (cartopy caches the download).