Skip to content

Fix warnings generated by sisotool #608

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 1 commit into from
Apr 11, 2021

Conversation

roryyorke
Copy link
Contributor

Use recommended canvas.manager.{get,set}_window_title instead of
deprecated canvas.{get,set}_window_title.

Remove redundant marker specification in sisotool rlocus plot.canvas.manager.{get,set}_window_title

Fixes these warnings on master (Python 3.9.2, Matplotlib 3.4.1, python-control 8299ebb):

ontrol/tests/sisotool_test.py::TestSisotool::test_sisotool
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect_dt
control/tests/sisotool_test.py::TestSisotool::test_sisotool_mimo
  /home/rory/src/python-control/control/sisotool.py:84: MatplotlibDeprecationWarning: 
  The get_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use manager.get_window_title or GUI-specific methods instead.
    if fig.canvas.get_window_title() != 'Sisotool':

control/tests/sisotool_test.py::TestSisotool::test_sisotool
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect_dt
control/tests/sisotool_test.py::TestSisotool::test_sisotool_mimo
  /home/rory/src/python-control/control/sisotool.py:87: MatplotlibDeprecationWarning: 
  The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use manager.set_window_title or GUI-specific methods instead.
    fig.canvas.set_window_title('Sisotool')

control/tests/sisotool_test.py::TestSisotool::test_sisotool
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect_dt
control/tests/sisotool_test.py::TestSisotool::test_sisotool_mimo
  /home/rory/src/python-control/control/rlocus.py:180: UserWarning: marker is redundantly defined by the 'marker' keyword argument and the fmt string "m." (-> marker='.'). The keyword argument will take precedence.
    fig.axes[1].plot(

control/tests/sisotool_test.py::TestSisotool::test_sisotool
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect
control/tests/sisotool_test.py::TestSisotool::test_sisotool_tvect_dt
  /home/rory/src/python-control/control/rlocus.py:628: UserWarning: marker is redundantly defined by the 'marker' keyword argument and the fmt string "m." (-> marker='.'). The keyword argument will take precedence.
    ax_rlocus.plot(

Use recommended canvas.manager.{get,set}_window_title instead of
deprecated canvas.{get,set}_window_title.

Remove redundant marker specification in sisotool rlocus plot.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.448% when pulling 7ae6d0a on roryyorke:rory/sisotool-warnings into 8299ebb on python-control:master.

@bnavigator bnavigator merged commit 15dc5ce into python-control:master Apr 11, 2021
@murrayrm murrayrm added this to the 0.9.1 milestone Dec 30, 2021
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.

4 participants