On Thu, Oct 28, 2010 at 3:16 PM, John <washa...@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
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to