Raise errors on invalid axis limits#8216
Conversation
lib/mpl_toolkits/mplot3d/axes3d.py
Outdated
| if right is None and cbook.iterable(left): | ||
| left, right = left | ||
|
|
||
| if ((np.isscalar(left)) and not (np.isfinite(left))) \ |
There was a problem hiding this comment.
Don't need the trailing \, enclosing in () does the job.
lib/matplotlib/axes/_base.py
Outdated
|
|
||
| self._process_unit_info(xdata=(left, right)) | ||
|
|
||
| if ((np.isscalar(left)) and not (np.isfinite(left))) \ |
There was a problem hiding this comment.
This should probably go after converting the units.
|
github-foo linkage: #7460 |
|
#7744 fixed the bug. Can this PR be re-based and sort out if the tests should be expanded? |
tacaswell
left a comment
There was a problem hiding this comment.
Need to sort out if tests are redundant, code changes are redundant.
|
I've just changed the title to make it more descriptive; it's much more useful to have a short description in the title than just the bug number. It also looks like there's some PEP8 errors - you can see them by clicking on the travis link below. |
|
FYI, those last three commits have some odd emails for the author/committer. |
|
Do we still need this PR now that #7744 has been merged? I think the tests are more through from this one? |
|
I think #8022 might cover even more tests. |
Raise error when xlim is set to nan or inf, same with both set_xlim, set_ylim, set_xlim3d, set_ylim3d, set_zlim3d.
Tests are included too
Fixes #7460