Hello All
    Thanks a lot Eric.  I think I have some module missing but I  
cannot figure out what it is.  I get the following.  Any idea.  This  
started hapening after I reinstalled matplotlib.

   File "/Users/Kennel/Pythoncodes/coolingmodel.py", line 6, in <module>
     import matplotlib
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/__init__.py", line 129, in <module>
     from rcsetup import defaultParams, validate_backend,  
validate_toolbar
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/rcsetup.py", line 19, in <module>
     from matplotlib.colors import is_color_like
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/colors.py", line 54, in <module>
     import matplotlib.cbook as cbook
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/cbook.py", line 10, in <module>
     import numpy.ma as ma
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/ma/__init__.py", line 47, in <module>
     import extras
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/ma/extras.py", line 45, in <module>
     from numpy.lib.index_tricks import AxisConcatenator
ImportError: cannot import name AxisConcatenator


The first few lines of my codes are:

from math import *
import exceptions
import pmag
import matplotlib
matplotlib.use("TkAgg")
import numpy as np
import matplotlib.pyplot as plt

Thanks a lot for all your help.

Mitra


On Nov 1, 2009, at 11:32 PM, Eric Firing wrote:

> R. Mitra wrote:
>> Hi Eric
>> from math import *
>> import matplotlib
>> matplotlib.use("TkAgg")
>> from pylab import *
>> This is very basic I know.  The above are the modules I am using.   
>> Is plt a separate module?  Thanks.
>
> With your method above, you don't need the "plt." part.  "from  
> pylab import *" is discouraged, however, except for quick  
> interactive use. For scripts, it is generally considered better  
> practice to use
>
> import matplotlib
> matplotlib.use("tkagg")
> import numpy as np
> import matplotlib.pyplot as plt
>
> pyplot is the plot-related part of the pylab namespace; or to put  
> it another way, pylab is pyplot plus numpy.
>
> See http://matplotlib.sourceforge.net/faq/usage_faq.html
>
> Eric
>
>
>
>> RM
>> On Nov 1, 2009, at 7:26 PM, Eric Firing wrote:
>>> R. Mitra wrote:
>>>> Hi
>>>>     I am having problems with contourf(). Suppose I have two  
>>>> 10X30  arrays X,Y and a corresponding Z value array.  How do I  
>>>> make the  upper left to be the origin? I cannot use contour  
>>>> (Z,origin='upper')  because the axis values gets messed up.
>>>
>>> It sounds like maybe you want to reverse the y-axis.  Try  
>>> something like  plt.gca().invert_yaxis() after your call to  
>>> contourf.
>>>
>>> Eric
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to