Skip to content

fix(mobile): respect Matplotlib aliases in plot style overrides - #991

Merged
petercorke merged 3 commits into
petercorke:mainfrom
tandede:fix/mobile-plot-style-aliases
Nov 27, 2026
Merged

petercorke merged 3 commits into
petercorke:mainfrom
tandede:fix/mobile-plot-style-aliases

Conversation

@tandede

@tandede tandede commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Passing goal_style={"ms": 8} to a planner used to pass both ms and the default markersize to Matplotlib and raise a TypeError. Normalise the defaults and the caller's options separately using the destination artist's aliases, then merge them. This also lets options passed to vehicle drawing override the spelling used at construction.

This changes public plotting behaviour for alias overrides. It does not change planning, control or estimation results. OpenAI Codex helped write and test the change.

Related issue

Fixes #990

Testing

Eight mobile plotting and planner test files passed on macOS with the Agg backend: 310 tests passed, 6 skipped and 11 subtests passed. Compared Ruff output for the changed files against the base commit and ran git diff --check. The full suite, documentation build and cross-platform CI were not run locally.

AI assistance: OpenAI Codex (GPT-6).

Co-Authored-By: OpenAI Codex (GPT-6) <noreply@openai.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -8 complexity · 0 duplication

Metric Results
Complexity -8
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit fc63480 into petercorke:main Nov 27, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 27, 2026
@petercorke

Copy link
Copy Markdown
Owner

Thank you, @tandede, merged. Plot style overrides now respect Matplotlib's aliases, and I checked the new tests pass on the current main.

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.

mobile: a style dict with short option names (ms=, lw=) clashes with the defaults

2 participants