Skip to content

Instantly share code, notes, and snippets.

@pmarshwx
Created Jul 11, 2012
Embed
What would you like to do?
A self-contained example script to highlight the quadmesh bug on OSX using MacOSX backend
import numpy as np
import matplotlib.pyplot as plt
a = np.arange(10)
grid = np.outer(a, a)
plt.pcolormesh(grid)
plt.show()
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
@MadDataScience
Copy link

MadDataScience commented Jul 12, 2012

I'm getting the same error. Any word on what to do about it?

@pmarshwx
Copy link
Author

pmarshwx commented Jul 12, 2012

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