subplot does not work in svn

The thing is, I deleted my entire ~/.matplotlib directory,

    > hoping to start clean. Where does matplotlib get its info
    > 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...

JDH

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’

···

On 1/31/07, John Hunter <jdhunter@…4…> wrote:

> The thing is, I deleted my entire ~/.matplotlib directory,
> hoping to start clean. Where does matplotlib get its info

> 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…


Chris Fonnesbeck + Atlanta, GA + http://trichech.us

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* <jdhunter@...4... > <mailto:jdhunter@…4…>> wrote:

     >>>>> "Chris" == Chris Fonnesbeck <chris@...941...
    <mailto:chris@…941…>> writes:

       > The thing is, I deleted my entire ~/.matplotlib directory,
       > hoping to start clean. Where does matplotlib get its info
       > 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
matplotlib-users List Signup and Options