Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Using local install of current git master - the following code works with the tkagg backend, but raises an error with the macosx backend:
import matplotlibmatplotlib.use('macosx')import matplotlib.pyplot as pltfig, ax = plt.subplots(1, 1)im = plt.imshow([[1, 2], [3, 4]])fig.canvas.draw()ax.draw_artist(im)
Error for macosx backend is:
Traceback (most recent call last): File "draw_artist.py", line 8, in <module> ax.draw_artist(im) File "/Users/mb312/dev_trees/matplotlib/lib/matplotlib/axes/_base.py",line 2423, in draw_artist raise AttributeError(msg)AttributeError: draw_artist can only be used after an initial drawwhich caches the render
It seems to me that the previous callfig.canvas.draw()
is the "initial draw" that should cache the renderer. So, is this a bug?