Skip to content

Fix color cycling not working in singular_values_plot #1138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

lkies
Copy link
Contributor

@lkies lkies commented Mar 2, 2025

This seems to have been caused by a name collision between the function scope color variable and the loop-"local" color variable. The first time _get_color is called it will replace the function level color so in the next iteration a colorspec is explicitly passed to _get_color so it will no longer automatically cycle through colors.

Closes #1134

this seems to have ben caused by a name collision between the function scope color variable and the loop-"local" color variable.
the first time _get_color is called it will replace the function level color so in the next iteration a color is explicitly passed to _get_color so it will no longer automatically cycle through colors.
@lkies
Copy link
Contributor Author

lkies commented Mar 2, 2025

And I guess the broken CI checks will also fail for this one...

@coveralls
Copy link

coveralls commented Mar 2, 2025

Coverage Status

coverage: 94.744%. remained the same
when pulling 049a716 on lkies:fix-svp
into f6799ab on python-control:main.

@murrayrm
Copy link
Member

murrayrm commented Mar 2, 2025

Thanks @lkies. We should also add a unit test to catch the issue and verify it is fixed. You can find one here: murrayrm@904516f

@lkies
Copy link
Contributor Author

lkies commented Mar 2, 2025

@murrayrm No problem, I added your test, but why not just merge your own changes?

@murrayrm
Copy link
Member

murrayrm commented Mar 2, 2025

I was waiting until we fixed the CI error before generating the PR, but since you had done the fix in parallel, definitely fine to use yours.

@murrayrm murrayrm added this to the 0.10.2 milestone Mar 3, 2025
@murrayrm murrayrm merged commit ad996f9 into python-control:main Mar 3, 2025
22 of 24 checks passed
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.

Singular values plot not changing colors for list of systems
3 participants