fix: match Python figure styling to MATLAB reference#68
Merged
iahncajigas merged 2 commits intomainfrom Mar 20, 2026
Merged
Conversation
Core diagnostic plot methods (fit.py): - KSPlot: black dash-dot diagonal, pure red CI bands, Arial 12pt bold labels, legend fontsize 14, explicit tick grid [0,.2,.4,.6,.8,1] - plotInvGausTrans: solid red CI lines (was gray dashed), LaTeX axis labels matching MATLAB (ACF(Φ⁻¹(uₙ)) and Δτ [sec]), legend fontsize 14 - plotSeqCorr: MATLAB-matching axis labels, tick grid, legend fontsize 14 - plotCoeffs: MATLAB-matching title with significance note, y-grid, 90-degree rotated x-tick labels - plotResidual: Arial fonts, legend fontsize 14 - All methods: axes linewidth 1, tick length 6px Plot style (plot_style.py): - Modern mode now sets Helvetica font on labels and tick labels - Tick params: length=6, width=1 (matching MATLAB [.02 .02]) - Per-axes legend styling (not just figure-level) Example scripts (all 5): - Removed all fig.suptitle() calls to match MATLAB (no figure-level titles) - Matched subplot title strings exactly to MATLAB (e.g., "Simulated Conditional Intensity Function (CIF)", "Cell#N", "Stimulus - Whisker Displacement") - Matched axis labels (λ(t) [Hz], Displacement Velocity [mm/s]) - Added fontname="Arial", fontsize=12, fontweight="bold" to labels - Fixed Example 02 displacement/velocity to black lines (was blue) - Fixed Example 04 Cell titles to "Cell#N" format, added axis ticks and legend matching MATLAB - Export DPI set to 250 across all examples (was 150 in some) - Removed bbox_inches="tight" to preserve figure dimensions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rotate fig05 stimulus-effect surfaces 90° CCW so time [s] is on x-axis and Trial [k] is on y-axis, matching MATLAB nSTATPaperExamples_15.png and fig03 bottom-panel orientation - Increase plotCoeffs marker size (8→12), capsize (3→5), linewidth (1→1.5), and significance star size (10→14) so all 3 model coefficients are visible - Add legend to plotCoeffs using lambda dataLabels, matching MATLAB behaviour - Regenerate affected figure PNGs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
iahncajigas
pushed a commit
that referenced
this pull request
Mar 23, 2026
The committed figures were stale — generated before the API parity and algorithm fixes in PRs #68-73. Regenerate all 6 example05 figures using the current code. The hybrid filter (fig06) now correctly shows state detection, movement probability tracking, and decoded trajectories matching the MATLAB reference output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
--export-figuresand visually compare with MATLAB reference figures indocs/figures/pytest -qto check for regressions🤖 Generated with Claude Code