Skip to content

Simplex projection visualization for observable triads #37

@jc-macdonald

Description

@jc-macdonald

Simplex projection visualization for observable triads

Implement the simplex projection visualization from both notebooks. This is the primary figure type for the structured observables manuscript — projecting model performance onto a 2-simplex defined by 3 observables.

Implementation

  • plot_simplex_projection(data, triad, ax=None, norm='twoslope', cmap='RdYlGn_r') — 2D ternary projection
  • plot_simplex_projection_3D(data, triad, ax=None) — 3D elevated simplex
  • prepare_simplex_data(results, triad) → barycentric coordinates + color values
  • generate_simplex_panels(results, triads, ncols=3) → multi-panel figure
  • TwoSlopeNorm support for diverging colormaps centered at pass/fail threshold
  • ROPE region overlay (shaded region of practical equivalence)
  • ConvexHull overlay showing fill ratio

Source code reference

  • Thoery_1_Code.ipynb: plot_simplex_projection with TwoSlopeNorm
  • Chemostat_Simulator.ipynb: plot_simplex_projection_3D (duplicated ~5x), prepare_simplex_data (~4x), generate_all_simplex_panels (~3x)

Deduplication note

The Chemostat notebook contains 5+ near-identical copies of simplex projection code with minor variations. This issue consolidates them into a single parametric implementation.

Tests

  • Barycentric coordinates sum to 1
  • Known triangle vertices map to correct simplex corners
  • Figure smoke test (renders without error)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions