Skip to content

Use initial root-locus limits when choosing gains - #1233

Open
marko1olo wants to merge 1 commit into
python-control:mainfrom
marko1olo:fix-root-locus-grid-margins
Open

Use initial root-locus limits when choosing gains#1233
marko1olo wants to merge 1 commit into
python-control:mainfrom
marko1olo:fix-root-locus-grid-margins

Conversation

@marko1olo

@marko1olo marko1olo commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • Pass xlim and ylim from root_locus_plot() into the initial root_locus_map() call.
  • Keeps the plotted root-locus sampling consistent with the explicit viewport before any zoom callback runs.
  • Adds a regression that compares the initial plotted loci count against root_locus_map(..., xlim=..., ylim=...).

Tests

  • MPLBACKEND=Agg python -m pytest control/tests/rlocus_test.py::test_root_locus_plot_initial_limits_refine_gains -q
  • MPLBACKEND=Agg python -m pytest control/tests/rlocus_test.py -q
  • python -m ruff check --no-cache control/rlocus.py control/tests/rlocus_test.py
  • python -m compileall -q control/rlocus.py control/tests/rlocus_test.py

AI Disclosure: Claude Code (Opus 5) was used during code navigation, initial drafting, and PR text preparation. All logic, code changes, and test cases have been manually reviewed, verified, and tested locally by the author in accordance with the NumPy AI Policy.

@marko1olo

Copy link
Copy Markdown
Author

Local verification on 74e5aa24:

  • PYTHONPATH=C:\hades\oss\python-control-root-locus-limits python -m pytest control\tests\rlocus_test.py -q -> 80 passed, 1 skipped
  • python -m ruff check control\rlocus.py control\tests\rlocus_test.py -> passed
  • git diff --check origin/main..HEAD -> passed

GitHub currently shows this as pending/unstable without any check runs or commit statuses attached to the head SHA, so I do not see a failing job to address from the API side.

@murrayrm

murrayrm commented Aug 9, 2026

Copy link
Copy Markdown
Member

@marko1olo Please rebase off of main to trigger updated CI checks from PR #1243.

@coveralls

coveralls commented Aug 13, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 94.757%. remained the same — marko1olo:fix-root-locus-grid-margins into python-control:main

@marko1olo

Copy link
Copy Markdown
Author

Rebased on main to pick up the updated CI checks. Thanks @murrayrm!

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.

3 participants