[Matplotlib-users] Basemap calls to colorbar() failing
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 May Graduate Research Assistant School of Meteorology University of Oklahoma -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap calls to colorbar() failing
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/PSD1Email : jeffrey.s.whita...@noaa.gov 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap calls to colorbar() failing
On Mon, Sep 28, 2009 at 4:54 PM, Jeff Whitaker jsw...@fastmail.fm wrote: 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. Trying both sounds like a good idea, since I just noticed this change is only in SVN trunk, and not in the 0.99.x series (which is probably why no one noticed). However, no attribute error is raised when setting the attribute, it's just never used. I'll see if I can come up with something similar that will work. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Norman, Oklahoma, United States -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users