Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix pzmap grid (matplotlib angle_helper)#456

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bnavigator merged 5 commits intopython-control:masterfrombnavigator:fix-mpl-grid
Aug 21, 2020

Conversation

bnavigator
Copy link
Contributor

CI runs started to fail today with:

Traceback (most recent call last):959  File "pvtol-nested.py", line 169, in <module>960    P, Z = pzmap(T, plot=True, grid=True)961  File "/home/travis/build/python-control/python-control/control/pzmap.py", line 106, in pzmap962    ax, fig = sgrid()963  File "/home/travis/build/python-control/python-control/control/grid.py", line 82, in sgrid964    ax.axis["wnxneg"] = axis = ax.new_floating_axis(0, 180)965  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/axislines.py", line 575, in new_floating_axis966    axes=self)967  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/grid_helper_curvelinear.py", line 350, in new_floating_axis968    axisline = AxisArtist(axes, _helper)969  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/axis_artist.py", line 746, in __init__970    self._init_line()971  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/axis_artist.py", line 887, in _init_line972    self._axis_artist_helper.get_line(self.axes),973  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/grid_helper_curvelinear.py", line 270, in get_line974    self.update_lim(axes)975  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/grid_helper_curvelinear.py", line 101, in update_lim976    self.grid_helper.update_lim(axes)977  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/axislines.py", line 327, in update_lim978    self._update(x1, x2, y1, y2)979  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/grid_helper_curvelinear.py", line 319, in _update980    self._update_grid(x1, y1, x2, y2)981  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/grid_helper_curvelinear.py", line 367, in _update_grid982    self.grid_info = self.grid_finder.get_grid_info(x1, y1, x2, y2)983  File "/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/mpl_toolkits/axisartist/grid_finder.py", line 104, in get_grid_info984    extremes = self.extreme_finder(self.inv_transform_xy, x1, y1, x2, y2)985  File "/home/travis/build/python-control/python-control/control/grid.py", line 44, in __call__986    self._adjust_extremes(lon_min, lon_max, lat_min, lat_max)987AttributeError: 'ModifiedExtremeFinderCycle' object has no attribute '_adjust_extremes'

Apparently Matplotlib removed the private function_adjust_extremes between3.2 and3.3 (I could not find the commit yet. Clicking blame on github doesn't work. Their git history is weird).

The specific branch ofpzmap and this portion ofgrid.py are not covered by the unit tests. Hence it was not discovered until now, when conda updated matplotlib and it fails in thepvtol-nested.pyexample.

@bnavigatorbnavigator added this to the0.8.4 milestoneAug 20, 2020
@bnavigatorbnavigator self-assigned thisAug 20, 2020
@coveralls
Copy link

coveralls commentedAug 20, 2020
edited
Loading

Coverage Status

Coverage increased (+2.0%) to 86.168% when pulling5632796 on bnavigator:fix-mpl-grid into08d5e6c on python-control:master.

@bnavigator
Copy link
ContributorAuthor

bnavigator commentedAug 20, 2020
edited
Loading

Added unit tests so we don't rely on the examples and coda. Two fixtureseditsdefaults andmplcleanup written for#438 are perfect for the use case here, so I pulled them from there. That should be relative benign when merging.

Found a copy and paste error in thepzmapdefaults handling

@bnavigatorbnavigator marked this pull request as ready for reviewAugust 20, 2020 21:30
@bnavigatorbnavigatorforce-pushed thefix-mpl-grid branch 2 times, most recently frome646370 to6445a6aCompareAugust 20, 2020 21:42
@bnavigator
Copy link
ContributorAuthor

Look at that increased coverage :)

Found another config/"defaults" handling bug in pzmap through the tests.

This was referencedAug 21, 2020
This was linked to issuesAug 21, 2020
@roryyorke
Copy link
Contributor

Looks good to me.

bnavigator reacted with hooray emoji

@bnavigator
Copy link
ContributorAuthor

With@roryyorke's approved review and the fact that without this fix current CI runs fail, I fell confident on merging this now.

@bnavigatorbnavigator merged commit6ede92e intopython-control:masterAug 21, 2020
@bnavigatorbnavigator deleted the fix-mpl-grid branchJanuary 5, 2021 20:13
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@bnavigatorbnavigator

Labels
Projects
None yet
Milestone
0.8.4
Development

Successfully merging this pull request may close these issues.

pzmap(sys, grid=True) fails pzmap(sys, grid=True) fails
3 participants
@bnavigator@coveralls@roryyorke

[8]ページ先頭

©2009-2025 Movatter.jp