From: Jeff P. <jef...@se...> - 2005-07-06 19:53:52
|
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. Jeff -----Original Message----- From: John Hunter [mailto:jdh...@ni...] Sent: Wednesday, July 06, 2005 11:56 AM To: Jeff Peery Cc: mat...@li... Subject: Re: [Matplotlib-users] plot date >>>>> "Jeff" == Jeff Peery <jef...@se...> writes: Jeff> Hello, I'm using plot_date for some simple data. This Jeff> function seems to always use a symbol (marker). If I set Jeff> the line pattern to 'r-' I get a solid red line but also Jeff> blue markers. How can I use plot_date without symbols Jeff> showing up? Thanks. Perhaps you are seeing a problem where your previous plot is not cleared and so you see both on the same axes? The format strings works for me as expected 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, 'r-') pylab.show() JDH |