plot date

I'm using 'axes.clear()' to clear the canvas and then I call

    > plot_date. Is there a better way to clear the plots?
    > Thanks.

That is an alias for ax.cla, should work fine.

    > Also, I tried running your script and I get this error:

    > "Warning (from warnings module):
    > File "C:\Python24\lib\site-packages\matplotlib\__init__.py", line 604
    > warnings.warn('Could not find .matplotlibrc; using defaults')
    > UserWarning: Could not find .matplotlibrc; using defaults

For some reason matplotlib is not finding its config file and is
falling back on the gtk backend, which is failing on your system.
Grab a copy of the rc file at http://matplotlib.sf.net/.matplotlibrc
and drop it in C:\Python24\share\matplotlib, and edit the backend
setting to a backend appropriate for your system, eg TkAgg or WXAgg.

JDH

I added the .matplotlibrc file and that definitely helps. Thanks.

Regarding the symbols, I changed your file to the match mine and I get
symbols. Here's the change I made:

import pylab
import datetime
d1 = datetime.date( 1995, 1, 1 )
d2 = datetime.date( 2004, 1, 1 )
delta = datetime.timedelta(days=365)

dates = pylab.drange(d1,d2,delta)

y = pylab.rand(len(dates))
pylab.plot_date(dates, y, color ='r',
                               linestyle ='--',
                               linewidth = 1)
pylab.show()

what is the difference here? Thank you very much for your help.

···

-----Original Message-----
From: John Hunter [mailto:jdhunter@…8…]
Sent: Wednesday, July 06, 2005 3:03 PM
To: Jeff Peery
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] plot date

    > I'm using 'axes.clear()' to clear the canvas and then I call
    > plot_date. Is there a better way to clear the plots?
    > Thanks.

That is an alias for ax.cla, should work fine.

    > Also, I tried running your script and I get this error:

    > "Warning (from warnings module):
    > File "C:\Python24\lib\site-packages\matplotlib\__init__.py",
line 604
    > warnings.warn('Could not find .matplotlibrc; using
defaults')
    > UserWarning: Could not find .matplotlibrc; using defaults

For some reason matplotlib is not finding its config file and is
falling back on the gtk backend, which is failing on your system.
Grab a copy of the rc file at http://matplotlib.sf.net/.matplotlibrc
and drop it in C:\Python24\share\matplotlib, and edit the backend
setting to a backend appropriate for your system, eg TkAgg or WXAgg.

JDH