On Thu, Oct 28, 2010 at 3:16 PM, John <washakie@gmail.com> wrote:
Hello, I've been using basemap with plt.colorbar for sometime, but I
just recently started to have the problem of:
AttributeError: 'NoneType' object has no attribute 'autoscale_None'

I ran the fcstmaps.py example (GREAT EXAMPLE by the way), and here is
the full error I get:

Traceback (most recent call last):
 File "fcstmaps.py", line 92, in <module>
   plt.colorbar(cax=cax, orientation='horizontal')
 File "/matplotlib/pyplot.py", line 1519, in colorbar
   ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
 File "/matplotlib/figure.py", line 1180, in colorbar
   cb = cbar.Colorbar(cax, mappable, **kw)
 File "/matplotlib/colorbar.py", line 706, in __init__
   mappable.autoscale_None() # Ensure mappable.norm.vmin, vmax
AttributeError: 'NoneType' object has no attribute 'autoscale_None'

I did upgrade matplotlib recently to version 1.0.0

Basemap is 0.99.4

Thanks,
john


John,

It appears the problem is in matplotlib, somehow...  Could you verify which version of matplotlib is actually being loaded by executing the following commands in python?

import matplotlib
print matplotlib.__version__

Currently, in version 1.0.0, the beginning of the pyplot.colorbar() function checks to see if mappable is None.  If not, then sets mappable to gci().  So, either you are running an older code that did not do this, or gci() is returning a None, which is curious...

Ben Root