Chris,

My guess is that you have some combination of 0.87.7 and svn; the 
traceback says 0.87.7, and the KeyError is because of an addition to 
rcParams since 0.87.7.

Try this:

In [1]:import matplotlib

In [2]:matplotlib.rcParams
Out[2]:
{'axes.axisbelow': False,
  'axes.edgecolor': 'k',
  'axes.facecolor': 'w',
  'axes.formatter.limits': (-7, 7),
  'axes.grid': False,
  'axes.hold': True,

etc. etc.

If you don't see the axes.formatter.limits key then your __init__.py is 
not from svn.  Maybe the thing to do is delete all versions and traces 
of matplotlib from your system and then re-download and install.

Eric

Chris Fonnesbeck wrote:
> On 1/31/07, *John Hunter* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>      >>>>> "Chris" == Chris Fonnesbeck <[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>> writes:
> 
>        Chris> The thing is, I deleted my entire ~/.matplotlib directory,
>        Chris> hoping to start clean. Where does matplotlib get its info
>        Chris> when a .matplotlibrc is not present in my home directory?
> 
>     It first looks in the current working dir and then in ~/.matplotlib
> 
>     Try running a sample script with --verbose-helpful and it will tell
>     you which file is being read...
> 
> 
> 
> I copied the matplotlibrc file from the source in svn; here is what I 
> get using --verbose-helpful:
> 
> Osoyoos:~ chris$ python plot.py --verbose-helpful
> plot.py:14: SyntaxWarning: import * only allowed at module level
>   def main():
> matplotlib data path 
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data
>  
> 
> $HOME=/Users/chris
> CONFIGDIR=/Users/chris/.matplotlib
> loaded rc file /Users/chris/.matplotlib/matplotlibrc
> matplotlib version 0.87.7
> verbose.level helpful
> interactive is False
> platform is darwin
> numerix numpy 1.0.2.dev3522
> font search path 
> ['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data']
> loaded ttfcache file /Users/chris/.matplotlib/ttffont.cache
> backend TkAgg version 8.4
> Traceback (most recent call last):
>   File "plot.py", line 20, in ?
>     main()
>   File "plot.py", line 16, in main
>     plot(range(10), range(10))
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
>  
> line 2038, in plot
>     b = ishold()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
>  
> line 937, in ishold
>     return gca().ishold()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
>  
> line 883, in gca
>     ax =  gcf().gca(**kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py",
>  
> line 679, in gca
>     return self.add_subplot(111, **kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/figure.py",
>  
> line 506, in add_subplot
>     a = Subplot(self, *args, **kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
>  
> line 4911, in __init__
>     Axes.__init__(self, fig, [ self.figLeft, self.figBottom,
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
>  
> line 439, in __init__
>     self._init_axis()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
>  
> line 470, in _init_axis
>     self.xaxis = XAxis(self)
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
>  
> line 514, in __init__
>     self.cla()
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
>  
> line 535, in cla
>     self.set_major_formatter(ScalarFormatter())
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ticker.py",
>  
> line 271, in __init__
>     self._powerlimits = rcParams['axes.formatter.limits ']
> KeyError: 'axes.formatter.limits'
> 
> 
> 
> -- 
> Chris Fonnesbeck + Atlanta, GA + http://trichech.us
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> 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-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to