Mike Bauer wrote:
> Hello,
> 
> Quick note. I'm making plots with hexbin and everything works  
> correctly until I try to use the norm='Normalize' option at which  
> point I get:
> 
> Traceback (most recent call last):
>    File "diff_engine_v2tmp.py", line 731, in <module>
>      kept_and_discards)
>    File "diff_engine_v2tmp.py", line 605, in main
>      plt.hexbin(xdat,ydat,cmap=cm.jet,gridsize=25,norm=Normalize' )

What is that single quote mark doing after Normalize?  If we ignore it, 
then it looks like you are passing a class, not a class instance as the 
kwarg needs.

>    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
> lib/python2.5/site-packages/matplotlib/pyplot.py", line 1920, in hexbin
>      ret =  gca().hexbin(*args, **kwargs)
>    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
> lib/python2.5/site-packages/matplotlib/axes.py", line 5452, in hexbin
>      collection.autoscale_None()
>    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/ 
> lib/python2.5/site-packages/matplotlib/cm.py", line 148, in  
> autoscale_None
>      self.norm.autoscale_None(self._A)
> AttributeError: 'int' object has no attribute 'autoscale_None'

This part of the traceback is also a little puzzling; I'm not sure why 
self.norm is an int at this point.

> 
> I assume this a bug of some sort.

No, I think the problem is that you are passing a class instead of an 
instance of a class as the norm kwarg to hexbin.  (It is not completely 
clear to me from the traceback, however--there is that strange single 
quote mark.) What kind of normalization are you trying to to?  In other 
words, what are you trying to accomplish by specifying the norm kwarg?

Eric


> 
> Thanks for any ideas.
> 
> Mike
> 
> Using:
>       os-x 10.5.6
>       python 2.5.4 from macports
>       matplotlib  0.98.5.2 from macports
> 
> 
> 
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to