BUG,DOC: Fix bad MPL kwarg in docs#16883
Merged
Merged
Conversation
Invalide kwarg to imshow causes failures in the plot directive for docs builds using MPL > v3.3
Member
|
Thanks for quickly hunting this down Ross! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An example in a
.. plotdirective had an invalid value for theoriginparameter ofimshow. It seems that input validation was added in matplotlib/matplotlib#16265, causing the numpy documentation build to fail with the following warning:sphinx error with matplotlib v3.3
WARNING: Exception occurred in plotting numpy-histogram2d-1 from /home/ross/repos/numpy/doc/source/reference/generated/numpy.histogram2d.rst: Traceback (most recent call last): File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/sphinxext/plot_directive.py", line 472, in run_code exec(code, ns) File "", line 21, in File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2707, in imshow __ret = gca().imshow( File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/__init__.py", line 1431, in inner return func(ax, *map(sanitize_sequence, args), **kwargs) File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/axes/_axes.py", line 5515, in imshow im = mimage.AxesImage(self, cmap, norm, interpolation, origin, extent, File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/image.py", line 897, in __init__ super().__init__( File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/image.py", line 247, in __init__ cbook._check_in_list(["upper", "lower"], origin=origin) File "/home/ross/.virtualenvs/numpy-dev/lib/python3.8/site-packages/matplotlib/cbook/__init__.py", line 2248, in _check_in_list raise ValueError( ValueError: 'low' is not a valid value for origin; supported values are 'upper', 'lower'This is also causing the doc building CI to fail.