I'm trying to have animated plots using draw_artist on mac os x and I got an error with the following script:
import numpy as np import matplotlib.pyplot as plt plt.ion() plt.figure() subplot = plt.subplot(1,1,1) axis = plt.imshow(np.random.random((10,10))) plt.draw() subplot.draw_artist(axis) plt.show() The traceback is: Traceback (most recent call last): File "matplotlib-bug.py", line 8, in <module> subplot.draw_artist(axis) File "/Volumes/Data/Local/lib/python2.7/site-packages/matplotlib/axes.py", line 1946, in draw_artist a.draw(self._cachedRenderer) File "/Volumes/Data/Local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Volumes/Data/Local/lib/python2.7/site-packages/matplotlib/image.py", line 338, in draw gc = renderer.new_gc() File "/Volumes/Data/Local/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py", line 105, in new_gc self.gc.save() RuntimeError: CGContextRef is NULL Is there something wrong in my script (it seems to be working on linux) ? Information: matplotlib version: 1.0.0 python version 2.7 macosx version: 10.6.4 Nicolas ------------------------------------------------------------------------------ Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users