From: Jeff W. <js...@fa...> - 2009-09-28 21:54:48
|
Ryan May wrote: > Jeff, > > Right now, for me, any Basemap example that uses colorbar() is broken > for me. I think there's a problem with how Basemap sets the current > 'image' so that a colorbar can be automatically generated for plots. > The code currently does: > > plt.gci._current = ret > > I think the current image handling in matplotlib itself was reworked > (at least according to SVN logs, r7494), so that now instead there's a > setter function: > > plt.sci(ret) > > I'd be happy fix these myself if you're too busy. > > Ryan > > Ryan: I'm off to Australia for a conference tomorrow, so if you could fix that I'd be grateful. I wonder if we shouldn't wrap the old plt.gci._current = ret in a try/except, and use the new way if an Attribute Error is raised. That way, it will still work with old versions of matplotlib. Thanks for catching this. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |