A self-contained example script to highlight the quadmesh bug on OSX using MacOSX backend
This file contains 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
import numpy as np | |
import matplotlib.pyplot as plt | |
a = np.arange(10) | |
grid = np.outer(a, a) | |
plt.pcolormesh(grid) | |
plt.show() |
This file contains 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
Commit: 8c57e4fe4909815092af470f4a036c80b407382c | |
Traceback (most recent call last): | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper | |
draw(artist, renderer, *args, **kwargs) | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/figure.py", line 927, in draw | |
func(*args) | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper | |
draw(artist, renderer, *args, **kwargs) | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/axes.py", line 1998, in draw | |
a.draw(renderer) | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper | |
draw(artist, renderer, *args, **kwargs) | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/collections.py", line 1451, in draw | |
self._antialiased, self.get_edgecolors()) | |
File "/Users/pmarsh/.local/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py", line 101, in draw_quad_mesh | |
showedges) | |
TypeError: only length-1 arrays can be converted to Python scalars |
There isn't a current fix right now. The creator of the MacOSX backend is aware of the bug and is working on a solution. Latest estimate I've heard is that it could be a week.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting the same error. Any word on what to do about it?