On Mon, Jan 26, 2009 at 2:14 PM, Nick Matzke <mat...@berkeley.edu> wrote: > Hi Mauro, > > Update: > > 1. I went to the place that threw an error in the basemap code: > > >> > "/Library/Frameworks/Python.framework/Versions/4.1.30101/lib/python2.5/site-packages/basemap-0.99.1.0001-py2.5-macosx-10.3-fat.egg/mpl_toolkits/basemap/__init__.py", > > >> line 2501, in set_axes_limits > >> figManager.canvas.draw() > >> AttributeError: 'NoneType' object has no attribute 'canvas' > >> > >> > > > The code is: > > ============ > # force draw if in interactive mode. > if is_interactive(): > figManager = _pylab_helpers.Gcf.get_active() > figManager.canvas.draw() > ============ > > > So, I changed "interactive = true" to "interactive = false" in my > matplotlibrc file.
Croizat is calling pylab here via basemap, which is a bug. Croizat is a wx app, and should never import pylab or pyplot. This is happening somewhere in basemap, most likely a call to basemap is not passing in an axes or figure instance in. When basemap gets a default axes instance of None, it imports pyplot and creates its own. I have no idea why this is happening on one platform and not another for Croizat, but this is where the bug is occurring most likely. A good way to track this down is to remove matplotlib/pyplot.py from site-packages and rerun. The stack trace should show you which Croizat/basemap call is triggering the import, and you can fix it there. The fix you are trying is dangerous, unsupported, and likely to fail in unpredicatable ways. JDH ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users