Hi,

this used to work a couple of months ago.

In [1]: from pylab import *

In [2]: mappable=cm.ScalarMappable(cmap=cm.jet)

In [3]: mappable.set_array(array([0,1]))

In [4]: cb=colorbar(mappable, orientation='horizontal')
---------------------------------------------------------------------------
exceptions.AttributeError                            Traceback (most recent
call last)

/home/huardda/Conferences/Luxembourg/src/<ipython console>

/usr/local/lib/python2.4/site-packages/matplotlib/pylab.py in
colorbar(mappable, cax, **kw)
   340     if mappable is None:
   341         mappable = gci()
--> 342     ret = gcf().colorbar(mappable, cax = cax, **kw)
   343     draw_if_interactive()
   344     return ret

/usr/local/lib/python2.4/site-packages/matplotlib/figure.py in
colorbar(self, mappable, cax, **kw)
   701         if cax is None:
   702             cax, kw = cbar.make_axes(ax, **kw)
--> 703         cb = cbar.Colorbar(cax, mappable, **kw)
   704         mappable.add_observer(cb)
   705         mappable.set_colorbar(cb, cax)

/usr/local/lib/python2.4/site-packages/matplotlib/colorbar.py in
__init__(self, ax, mappable, **kw)
   474         kw['cmap'] = mappable.cmap
   475         kw['norm'] = mappable.norm
--> 476         kw['alpha'] = mappable.get_alpha()
   477         if isinstance(mappable, ContourSet):
   478             CS = mappable

AttributeError: ScalarMappable instance has no attribute 'get_alpha'

Ciao,

David
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to