Skip to content

[WAVE 2][RTR] Fix linear bounds rendering in plots - #1065

Open
mickaelbegon wants to merge 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-973-collocation-plot-bounds
Open

[WAVE 2][RTR] Fix linear bounds rendering in plots#1065
mickaelbegon wants to merge 2 commits into
pyomeca:masterfrom
mickaelbegon:codex/fix-973-collocation-plot-bounds

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render InterpolationType.LINEAR bounds with regular lines instead of post-steps
  • preserve step rendering for constant and frame-based bounds
  • add a focused regression test for interpolated minimum and maximum bounds

Root cause

Bounds were always sent through Axes.step(..., where="post"). This changes linear bounds into piecewise-constant values between shooting nodes, so they do not match integrated state trajectories such as collocation plots.

Validation

  • MPLCONFIGDIR=/private/tmp/bioptim-mpl-973 python -m pytest tests/shard1/test_plot.py -q (6 passed)
  • git diff --check

Closes #973


This change is Reviewable

@mickaelbegon mickaelbegon changed the title Fix linear bounds rendering in plots [HOLD] Fix linear bounds rendering in plots Jul 22, 2026
@mickaelbegon
mickaelbegon force-pushed the codex/fix-973-collocation-plot-bounds branch from a45e9b7 to c7b9355 Compare July 26, 2026 22:08
@mickaelbegon mickaelbegon changed the title [HOLD] Fix linear bounds rendering in plots [WAVE 2] Fix linear bounds rendering in plots Jul 26, 2026
@mickaelbegon
mickaelbegon marked this pull request as ready for review July 26, 2026 22:09
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.86%. Comparing base (89c83a3) to head (67e4534).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1065      +/-   ##
==========================================
+ Coverage   77.26%   77.86%   +0.60%     
==========================================
  Files         196      196              
  Lines       21506    21506              
==========================================
+ Hits        16616    16746     +130     
+ Misses       4890     4760     -130     
Flag Coverage Δ
unittests 77.86% <100.00%> (+0.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mickaelbegon

Copy link
Copy Markdown
Contributor Author

Codex analysis

This PR is part of Wave 2 and is rebased onto current master (e8fbc729). It limits the change to rendering linear plot bounds correctly and adds focused plot regression coverage.

Review isolation: it changes only bioptim/gui/plot.py and tests/shard1/test_plot.py; it has no source-file overlap with #1062 or #1067.

Validation completed by Codex:

  • macOS, Python 3.14 / CasADi 3.7.2: tests/shard1/test_plot.py — 6 passed
  • the unrelated macOS numerical test that failed on the first CI attempt was reproduced locally — 1 passed
  • GitHub Actions after retrigger: 23/23 checks passed
  • git diff --check passed

The final commit (67e45341) is intentionally empty and only retriggered CI after unrelated numerical-tolerance failures; it adds no review surface.

@EveCharbie @pariterre, all local and online checks are green. This PR is ready for review as an independent Wave 2 change.

@mickaelbegon mickaelbegon changed the title [WAVE 2] Fix linear bounds rendering in plots [WAVE 2][RTR] Fix linear bounds rendering in plots Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sol.graphs() unavailable for collocation problems when min/max bounds are involved

1 participant