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

Copy link
Copy Markdown
Contributor

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

@marko1olo

Copy link
Copy Markdown
Contributor 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.

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.

1 participant