pyvale.validation.validplot module

Diagnostic plots for validation samples and labelled metric fields.

class ValidPlotOpts(title=None, x_label=None, x_axis_offset=True, y_label=None, sim_label='Sim', exp_label='Exp', metric_labels=<factory>, sim_color='tab:blue', exp_color='tab:orange', sim_profile_color='#008b95', exp_profile_color='#a65316', sim_linestyle=(0, (8, 3)), exp_linestyle='-', sim_bounds_linestyle='-', exp_bounds_linestyle='--', sim_profile_linestyle=(0, (3, 2)), exp_profile_linestyle=(0, (2, 2)), sim_offset_linestyle='-.', exp_offset_linestyle='-.', exp_conf_linestyle=':', shade_bounds=True, bounds_alpha=0.12, metric_color='grey', metric_line_color='black', metric_alpha=0.25, metric_linestyle='-.', metric_alt_linestyle='--', ecdf_overlay_alpha=0.25, legend_outside=False, legend_columns=1, resolution=300.0, font_tick_size=8.0, font_head_size=9.0, font_ax_size=8.0, font_leg_size=8.0, font_ecdf_leg_size=6.5, font_def_weight='normal', font_name=<factory>, single_fig_size_landscape=<factory>, lw=0.8, ecdf_lw_scale=1.5, ms=3.2)[source]

Bases: object

Control validation figure layout, labels, source styles and ECDF shading.

Variables:
  • title (str or None) – Optional axes title override.

  • x_label (str or None) – Optional x-axis label override.

  • x_axis_offset (bool) – Allow an additive offset in numeric x-axis tick labels.

  • y_label (str or None) – Optional y-axis label override.

  • sim_label (str) – Base legend label for simulation curves.

  • exp_label (str) – Base legend label for experimental curves.

  • metric_labels (dict[EMetricType, str]) – Display label overrides keyed by metric type.

  • sim_color (str) – Colour of simulation curves.

  • exp_color (str) – Colour of experimental curves.

  • sim_profile_color (str) – Colour of simulation nuisance profile curves.

  • exp_profile_color (str) – Colour of experimental nuisance profile curves.

  • sim_linestyle (_LineStyle) – Line style of nominal simulation curves.

  • exp_linestyle (_LineStyle) – Line style of nominal experimental curves.

  • sim_bounds_linestyle (_LineStyle) – Line style of simulation bounds.

  • exp_bounds_linestyle (_LineStyle) – Line style of experimental bounds.

  • sim_profile_linestyle (_LineStyle) – Line style of simulation profile bounds.

  • exp_profile_linestyle (_LineStyle) – Line style of experimental profile bounds.

  • sim_offset_linestyle (_LineStyle) – Line style of simulation offset curves.

  • exp_offset_linestyle (_LineStyle) – Line style of experimental offset curves.

  • exp_conf_linestyle (_LineStyle) – Line style of experimental confidence limits.

  • shade_bounds (bool) – Fill between distinct lower and upper bounds.

  • bounds_alpha (float) – Opacity of the region between ECDF bounds.

  • metric_color (str) – Fill colour for metric overlays and histograms.

  • metric_line_color (str) – Line and edge colour for metric artists.

  • metric_alpha (float) – Opacity of shaded metric regions.

  • metric_linestyle (_LineStyle) – Line style for the primary metric curve.

  • metric_alt_linestyle (_LineStyle) – Line style for a second metric curve or direction.

  • ecdf_overlay_alpha (float) – Opacity of individual ECDF, profile and confidence overlays.

  • legend_outside (bool) – Place the legend below the axes.

  • legend_columns (int) – Number of legend columns.

  • resolution (float) – Figure resolution in dots per inch.

  • font_tick_size (float) – Tick label size in points.

  • font_head_size (float) – Axes title size in points.

  • font_ax_size (float) – Axis label size in points.

  • font_leg_size (float) – Default legend font size in points.

  • font_ecdf_leg_size (float) – ECDF legend font size in points.

  • font_def_weight (str) – Font weight for titles and axis labels.

  • font_name (str) – Matplotlib font family.

  • single_fig_size_landscape (tuple[float, float]) – Width and height of one landscape panel, in inches.

  • lw (float) – Base line width in points.

  • ecdf_lw_scale (float) – Multiplier applied to the base ECDF line width.

  • ms (float) – Marker size in points.

title
x_label
x_axis_offset
y_label
sim_label
exp_label
metric_labels
sim_color
exp_color
sim_profile_color
exp_profile_color
sim_linestyle
exp_linestyle
sim_bounds_linestyle
exp_bounds_linestyle
sim_profile_linestyle
exp_profile_linestyle
sim_offset_linestyle
exp_offset_linestyle
exp_conf_linestyle
shade_bounds
bounds_alpha
metric_color
metric_line_color
metric_alpha
metric_linestyle
metric_alt_linestyle
ecdf_overlay_alpha
legend_outside
legend_columns
resolution
font_tick_size
font_head_size
font_ax_size
font_leg_size
font_ecdf_leg_size
font_def_weight
font_name
single_fig_size_landscape
lw
ecdf_lw_scale
ms
__init__(title=None, x_label=None, x_axis_offset=True, y_label=None, sim_label='Sim', exp_label='Exp', metric_labels=<factory>, sim_color='tab:blue', exp_color='tab:orange', sim_profile_color='#008b95', exp_profile_color='#a65316', sim_linestyle=(0, (8, 3)), exp_linestyle='-', sim_bounds_linestyle='-', exp_bounds_linestyle='--', sim_profile_linestyle=(0, (3, 2)), exp_profile_linestyle=(0, (2, 2)), sim_offset_linestyle='-.', exp_offset_linestyle='-.', exp_conf_linestyle=':', shade_bounds=True, bounds_alpha=0.12, metric_color='grey', metric_line_color='black', metric_alpha=0.25, metric_linestyle='-.', metric_alt_linestyle='--', ecdf_overlay_alpha=0.25, legend_outside=False, legend_columns=1, resolution=300.0, font_tick_size=8.0, font_head_size=9.0, font_ax_size=8.0, font_leg_size=8.0, font_ecdf_leg_size=6.5, font_def_weight='normal', font_name=<factory>, single_fig_size_landscape=<factory>, lw=0.8, ecdf_lw_scale=1.5, ms=3.2)
class EValidSource(*values)[source]

Bases: StrEnum

Choose simulation or experiment as the source for an ECDF plot.

SIM = 'sim'
EXP = 'exp'
class EValidMAVMDiagnostic(*values)[source]

Bases: Enum

Choose distribution, pairwise comparison or support correction views.

DISTRIBUTIONS = 1
COMPARISONS = 2
CORRECTION = 3
MODEL_CORRECTION = 4
class EECDFCentre(*values)[source]

Bases: Enum

Choose whether to draw the mean or median quantile curve across cases.

NONE = 1
MEAN = 2
MEDIAN = 3
class ECDFVisOpts(show_bounds=True, centre=EECDFCentre.NONE, epis_case_idxs=())[source]

Bases: object

Choose which curves to draw from an ECDF view.

Overlay indices are original (transferable, nuisance) pairs. An empty tuple draws no overlays. None draws all selected cases.

Variables:
  • show_bounds (bool) – Draw pointwise lower and upper quantiles for a multi-curve view.

  • centre (EECDFCentre) – Optional pointwise mean or median of the displayed quantile curves.

  • epis_case_idxs (tuple[tuple[int, int], ] or None) – Original (transferable, nuisance) index pairs to overlay. None selects every pair; an empty tuple selects none.

show_bounds
centre
epis_case_idxs
__init__(show_bounds=True, centre=EECDFCentre.NONE, epis_case_idxs=())
class EShowECDFBounds(*values)[source]

Bases: Enum

Choose outer bounds or all individual cases for ECDF display.

OUTER = 1
ALL = 2
class EMetricDisp(*values)[source]

Bases: Enum

Choose how a validation metric is displayed on an ECDF plot.

SUPPORT_SHIFT = 1
INTEGRATION_AREA = 2
CDF_DIFFERENCE = 3
ANNOTATION = 4
class ECDFReference(source=EValidSource.SIM, probability=0.5)[source]

Bases: object

Normalise by a quantile of the displayed family’s mean quantile curve.

Variables:
  • source (EValidSource) – Source used to obtain the normalising quantile.

  • probability (float) – Cumulative probability in (0, 1] on the selected mean quantile curve.

source
probability
__init__(source=EValidSource.SIM, probability=0.5)
class ECDFComparison(sim_trans_idx=0, sim_nuis_idx=0, exp_trans_idx=0, exp_nuis_idx=0, sim_offset=EEpisOffset.NOMINAL, exp_offset=EEpisOffset.NOMINAL)[source]

Bases: object

Choose an original conditional sim/exp pair for a metric overlay.

Variables:
  • sim_trans_idx (int) – Original simulation transferable case index.

  • sim_nuis_idx (int) – Original simulation nuisance case index.

  • exp_trans_idx (int) – Original experimental transferable case index.

  • exp_nuis_idx (int) – Original experimental nuisance case index.

  • sim_offset (EEpisOffset) – Simulation offset used in the comparison.

  • exp_offset (EEpisOffset) – Experimental offset used in the comparison.

sim_trans_idx
sim_nuis_idx
exp_trans_idx
exp_nuis_idx
sim_offset
exp_offset
__init__(sim_trans_idx=0, sim_nuis_idx=0, exp_trans_idx=0, exp_nuis_idx=0, sim_offset=EEpisOffset.NOMINAL, exp_offset=EEpisOffset.NOMINAL)
class ECDFPlot(figure, axes, valid_case, observable, point_idxs, component_idx, time_idx, data, options, normalisation=None)[source]

Bases: object

Composable figure and the exact source selections used in each panel.

Created by the source plotting functions. Source arrays are borrowed and must not be mutated while adding overlays. Axes always form a 2D grid.

Variables:
  • figure (Figure) – Matplotlib figure for the composed plot.

  • axes (ndarray) – Object array of Matplotlib axes with shape (n_rows, n_columns). Active panels follow point_idxs in row-major order.

  • valid_case (ValidCase) – Aligned simulation and experiment observations with their named axes.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • point_idxs (tuple[int, ]) – Original point indices in panel order. None selects all available points.

  • component_idx (int) – Zero-based observable component index.

  • time_idx (int) – Zero-based evaluation time index.

  • data (tuple[dict[EValidSource, ECDFView], ]) – One dictionary per active panel, mapping each plotted source to its computed ECDF view.

  • options (ValidPlotOpts) – Matplotlib styling options used by the plot.

  • normalisation (tuple[float, ] or None) – Optional nonzero normalisation constant for each active panel.

figure
axes
valid_case
observable
point_idxs
component_idx
time_idx
data
options
normalisation
__init__(figure, axes, valid_case, observable, point_idxs, component_idx, time_idx, data, options, normalisation=None)
plot_sim_ecdfs(valid_case, observable, *, view=None, vis_opts=None, offset=EEpisOffset.NOMINAL, show_bounds=EShowECDFBounds.OUTER, nuisance_profile=None, nuisance_profile_quantile=None, point_idxs=(0,), component_idx=0, time_idx=0, rows=None, columns=None, valid_plot_opts=None, ax=None)[source]

Plot sim conditional ECDFs or epistemic summaries; return a composable figure.

Default to the outer envelope over both epistemic axes at point zero. point_idxs=None explicitly selects every physical point. An existing ax accepts one point only. Set nuisance_profile to overlay a nuisance reduction within the selected envelope. ALL also displays original epistemic curves.

Parameters:
  • valid_case (ValidCase) – Aligned simulation and experiment observations with their named axes.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • view (ECDFViewSel or None, optional) – Epistemic selection and reduction for this source. None uses the default selection.

  • vis_opts (ECDFVisOpts or None, optional) – Controls for drawing bounds, a centre curve and original cases.

  • offset (EEpisOffset or None, optional) – Offset to plot. None includes nominal and all available coherent offsets.

  • show_bounds (EShowECDFBounds, optional) – Display mode for outer limits or individual offset and case curves.

  • nuisance_profile (EECDFReduce or None, optional) – Optional nuisance reduction drawn as an additional curve or set of curves.

  • nuisance_profile_quantile (float or None, optional) – Probability in [0, 1] when nuisance_profile is QUANTILE.

  • point_idxs (tuple[int, ] or None, optional) – Original point indices in panel order. None selects all available points.

  • component_idx (int, optional) – Zero-based observable component index.

  • time_idx (int, optional) – Zero-based evaluation time index.

  • rows (int or None, optional) – Requested grid rows. None chooses the count from the panel count and columns.

  • columns (int or None, optional) – Requested grid columns. None chooses the count automatically.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

  • ax (Axes or None, optional) – Matplotlib axes to draw into. Public plotters create axes when None is supplied.

Returns:

ECDFPlot – Figure, two-dimensional axes grid and the simulation ECDF view for each active panel.

plot_exp_ecdfs(valid_case, observable, *, view=None, vis_opts=None, offset=EEpisOffset.NOMINAL, show_bounds=EShowECDFBounds.OUTER, confidence_alpha=None, nuisance_profile=None, nuisance_profile_quantile=None, point_idxs=(0,), component_idx=0, time_idx=0, rows=None, columns=None, valid_plot_opts=None, ax=None)[source]

Plot exp ECDFs with optional nuisance profiles and MAVM confidence bounds.

Use offset=None for nominal and shifted ECDFs on the same axes. OUTER shows the enclosing bounds, while ALL includes each selected original epistemic curve.

Parameters:
  • valid_case (ValidCase) – Aligned simulation and experiment observations with their named axes.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • view (ECDFViewSel or None, optional) – Epistemic selection and reduction for this source. None uses the default selection.

  • vis_opts (ECDFVisOpts or None, optional) – Controls for drawing bounds, a centre curve and original cases.

  • offset (EEpisOffset or None, optional) – Offset to plot. None includes nominal and all available coherent offsets.

  • show_bounds (EShowECDFBounds, optional) – Display mode for outer limits or individual offset and case curves.

  • confidence_alpha (float or None, optional) – Experimental MAVM confidence parameter in (0, 0.5]. None suppresses confidence bounds.

  • nuisance_profile (EECDFReduce or None, optional) – Optional nuisance reduction drawn as an additional curve or set of curves.

  • nuisance_profile_quantile (float or None, optional) – Probability in [0, 1] when nuisance_profile is QUANTILE.

  • point_idxs (tuple[int, ] or None, optional) – Original point indices in panel order. None selects all available points.

  • component_idx (int, optional) – Zero-based observable component index.

  • time_idx (int, optional) – Zero-based evaluation time index.

  • rows (int or None, optional) – Requested grid rows. None chooses the count from the panel count and columns.

  • columns (int or None, optional) – Requested grid columns. None chooses the count automatically.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

  • ax (Axes or None, optional) – Matplotlib axes to draw into. Public plotters create axes when None is supplied.

Returns:

ECDFPlot – Figure, two-dimensional axes grid and the experimental ECDF view for each active panel.

plot_sim_exp_cdfs(valid_case, observable, *, sim_view=None, exp_view=None, sim_vis_opts=None, exp_vis_opts=None, sim_offset=EEpisOffset.NOMINAL, exp_offset=EEpisOffset.NOMINAL, show_bounds=EShowECDFBounds.OUTER, confidence_alpha=None, nuisance_profile=None, nuisance_profile_quantile=None, point_idxs=(0,), component_idx=0, time_idx=0, rows=None, columns=None, valid_plot_opts=None, ax=None)[source]

Compare sim and exp ECDFs across the selected epistemic cases.

Each source defaults to a shaded pointwise epistemic envelope, or one ECDF when only one epistemic curve remains. Set nuisance_profile to overlay a pointwise nuisance reduction within each transferable case. QUANTILE also requires nuisance_profile_quantile. Use exp_offset=None or sim_offset=None to display nominal and coherent offsets together. Set confidence_alpha to display MAVM experimental confidence bounds. ALL includes individual epistemic curves and confidence pairs. Metric overlays use the original plot selections.

Parameters:
  • valid_case (ValidCase) – Aligned simulation and experiment observations with their named axes.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • sim_view (ECDFViewSel or None, optional) – Simulation epistemic selection and reduction settings.

  • exp_view (ECDFViewSel or None, optional) – Experimental epistemic selection and reduction settings.

  • sim_vis_opts (ECDFVisOpts or None, optional) – Display options for the simulation curves.

  • exp_vis_opts (ECDFVisOpts or None, optional) – Display options for the experimental curves.

  • sim_offset (EEpisOffset or None, optional) – Simulation offset to display. None includes all available offsets.

  • exp_offset (EEpisOffset or None, optional) – Experimental offset to display. None includes all available offsets.

  • show_bounds (EShowECDFBounds, optional) – Display mode for outer limits or individual offset and case curves.

  • confidence_alpha (float or None, optional) – Experimental MAVM confidence parameter in (0, 0.5]. None suppresses confidence bounds.

  • nuisance_profile (EECDFReduce or None, optional) – Optional nuisance reduction drawn as an additional curve or set of curves.

  • nuisance_profile_quantile (float or None, optional) – Probability in [0, 1] when nuisance_profile is QUANTILE.

  • point_idxs (tuple[int, ] or None, optional) – Original point indices in panel order. None selects all available points.

  • component_idx (int, optional) – Zero-based observable component index.

  • time_idx (int, optional) – Zero-based evaluation time index.

  • rows (int or None, optional) – Requested grid rows. None chooses the count from the panel count and columns.

  • columns (int or None, optional) – Requested grid columns. None chooses the count automatically.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

  • ax (Axes or None, optional) – Matplotlib axes to draw into. Public plotters create axes when None is supplied.

Returns:

ECDFPlot – Figure and axes grid of shape (n_rows, n_columns), with both source views per active panel.

add_support_overlay(plot, supports, *, output=None, selectors=None, label=None)[source]

Draw precomputed bounds/profiles without recalculating validation metrics.

Select unresolved transferable or offset axes explicitly. Physical axes follow the plot panels; fixed physical selectors in the numerical profile must match. D_PLUS/D_MINUS show the corresponding extension separately. Omit output for the full support envelope. Bounds-based results with no physical axes are for a single-panel plot.

Parameters:
  • plot (ECDFPlot) – Existing ECDF plot to modify in place.

  • supports (ECDFMetricBounds) – Simulation support bounds with shape (*retained_shape, n_probs).

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • selectors (dict[EValidResAxis, int] or None, optional) – Zero-based indices keyed by result axis; omitted axes follow the operation’s defaults.

  • label (str or None, optional) – Legend text for the drawn curve or overlay.

add_normalised_ecdf_axis(plot, reference)[source]

Add a secondary x/c axis using one constant per physical panel.

A reference quantile is evaluated on the displayed family’s mean quantile curve, after its selected epistemic reductions. This is a constant scaling, not a probability-dependent displacement. Metric values retain physical units.

Parameters:
  • plot (ECDFPlot) – Existing ECDF plot to modify in place.

  • reference (float or ECDFReference) – Nonzero scale or reference quantile of a selected source’s displayed mean curve.

add_metric_overlay(plot, metric, *, output=None, display=None, comparison=None)[source]

Compose a metric illustration with the exact selected conditional samples.

Support shifts default to outer limits over original sim/exp comparisons, including when the displayed ECDF view contains mean/median summaries. MAVM shows the full support envelope unless a direction is selected. They never shift an envelope by a global maximum distance. Integration areas require a sole original pair or an explicit comparison. KS defaults to two vertical distances between the displayed lower/upper support envelopes. CvM and paired metrics default to annotations of original comparison values. No metric is calculated from synthetic mean/median observations.

Parameters:
  • plot (ECDFPlot) – Existing ECDF plot to modify in place.

  • metric (IValidMetric) – Metric identifier or strategy used by the plot or overlay.

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • display (EMetricDisp or None, optional) – Overlay geometry to draw. None chooses a default for the metric.

  • comparison (ECDFComparison or None, optional) – Optional explicit original simulation and experiment case pair.

plot_valid_metric_time(result, observable, metric, *, selectors=None, output=None, valid_plot_opts=None, ax=None)[source]

Plot a selected epistemic case over time. MAVM defaults to both directions.

Parameters:
  • result (ValidResult) – Validation results containing the requested observable and metric.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • metric (EMetricType) – Metric identifier or strategy used by the plot or overlay.

  • selectors (dict[EValidResAxis, int] or None, optional) – Zero-based indices keyed by result axis; omitted axes follow the operation’s defaults.

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

  • ax (Axes or None, optional) – Matplotlib axes to draw into. Public plotters create axes when None is supplied.

Returns:

tuple[Figure, Axes] – Figure and axes with metric values against the one-dimensional physical time coordinate.

plot_metric_dist(result, observable, metric, *, output=None, selectors=None, valid_plot_opts=None, ax=None)[source]

Histogram finite metric values over selected comparison cells.

Parameters:
  • result (ValidResult) – Validation results containing the requested observable and metric.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • metric (EMetricType) – Metric identifier or strategy used by the plot or overlay.

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • selectors (dict[EValidResAxis, int] or None, optional) – Zero-based indices keyed by result axis; omitted axes follow the operation’s defaults.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

  • ax (Axes or None, optional) – Matplotlib axes to draw into. Public plotters create axes when None is supplied.

Returns:

tuple[Figure, Axes] – Figure and axes with a histogram of the selected finite metric cells.

create_valid_plot_grid(point_count, *, rows=None, columns=None, valid_plot_opts=None)[source]

Create landscape diagnostic panels using standard plot options.

Returns a two-dimensional axes array, hiding spare panels. Supply a panel count and optionally rows, columns or both to control the grid.

Parameters:
  • point_count (int) – Number of visible panels.

  • rows (int or None, optional) – Requested grid rows. None chooses the count from the panel count and columns.

  • columns (int or None, optional) – Requested grid columns. None chooses the count automatically.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

Returns:

tuple[Figure, ndarray] – Figure and object array of Matplotlib axes with shape (n_rows, n_columns). Spare axes are hidden.

plot_metric_time_points(result, observable, metric, *, point_idxs, selectors=None, output=None, columns=None, valid_plot_opts=None)[source]

Plot a selected epistemic case per point. MAVM defaults to both directions.

The panel grid is sized from the point count unless columns is supplied.

Parameters:
  • result (ValidResult) – Validation results containing the requested observable and metric.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • metric (EMetricType) – Metric identifier or strategy used by the plot or overlay.

  • point_idxs (tuple[int, ]) – Original point indices in panel order. None selects all available points.

  • selectors (dict[EValidResAxis, int] or None, optional) – Zero-based indices keyed by result axis; omitted axes follow the operation’s defaults.

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • columns (int or None, optional) – Requested grid columns. None chooses the count automatically.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

Returns:

tuple[Figure, ndarray] – Figure and two-dimensional axes grid with one time-series panel per selected point.

plot_metric_extrema_time(result, observable, metric, *, profile, point_idxs=None, selectors=None, output=None, columns=3, valid_plot_opts=None)[source]

Plot precomputed minimum and maximum traces in one panel per point.

Select any remaining non-singleton axes with selectors. By default all profiled points and both MAVM directions are shown.

Parameters:
  • result (ValidResult) – Validation results containing the requested observable and metric.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • metric (EMetricType) – Metric identifier or strategy used by the plot or overlay.

  • profile (ValidMetricExtrema) – Previously computed metric extrema and their controlling case indices.

  • point_idxs (tuple[int, ] or None, optional) – Original point indices in panel order. None selects all available points.

  • selectors (dict[EValidResAxis, int] or None, optional) – Zero-based indices keyed by result axis; omitted axes follow the operation’s defaults.

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • columns (int, optional) – Requested grid columns. None chooses the count automatically.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

Returns:

tuple[Figure, ndarray] – Figure and two-dimensional axes grid with lower and upper metric traces per selected point.

plot_metric_extrema_ecdfs(valid_case, observable, metric, *, profile, selectors=None, output=None, valid_plot_opts=None)[source]

Plot the original ECDF pairs that produced a stored minimum and maximum.

Select every non-singleton retained axis, including the physical time if present. Multi-output profiles require an explicit metric output.

Parameters:
  • valid_case (ValidCase) – Aligned simulation and experiment observations with their named axes.

  • observable (str) – Observable tag identifying matching metadata and observations.

  • metric (EMetricType) – Metric identifier or strategy used by the plot or overlay.

  • profile (ValidMetricExtrema) – Previously computed metric extrema and their controlling case indices.

  • selectors (dict[EValidResAxis, int] or None, optional) – Zero-based indices keyed by result axis; omitted axes follow the operation’s defaults.

  • output (EMetricOut or None, optional) – Metric output to select. Use None to infer a single available output.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

Returns:

tuple[Figure, ndarray] – Figure and axes array of shape (1, 2), showing the original minimum and maximum comparisons.

plot_valid_mavm_diagnostic(sim, exp=None, *, sim_support_cases=None, exp_support_cases=None, bound_pairs=None, view=EValidMAVMDiagnostic.DISTRIBUTIONS, valid_plot_opts=None, ax=None)[source]

Compare uncertainty bands, shifted endpoint curves or MAVM support.

Support case indices select whole original curves. With no indices, the diagnostic draws pointwise bounds.

The bound pairs provide the scalar MAVM distances used to shift sim support and draw the outer support band.

Parameters:
  • sim (ECDFView) – Computed simulation ECDF view.

  • exp (ECDFView or None, optional) – Optional experimental ECDF view.

  • sim_support_cases (tuple[int, int] or None, optional) – Optional pair of original simulation case indices for the lower and upper curves.

  • exp_support_cases (tuple[int, int] or None, optional) – Optional pair of original experimental case indices for the lower and upper curves.

  • bound_pairs (MAVMBoundPairs or None, optional) – MAVM endpoint comparisons required for shifted support and comparison views.

  • view (EValidMAVMDiagnostic, optional) – Diagnostic mode for distributions, comparisons or corrected support.

  • valid_plot_opts (ValidPlotOpts or None, optional) – Matplotlib layout and appearance settings. Use None for defaults.

  • ax (Axes or None, optional) – Matplotlib axes to draw into. Public plotters create axes when None is supplied.

Returns:

tuple[Figure, Axes] – Figure and axes with the selected MAVM diagnostic.