[Matplotlib-users] plot_date and legend

2008-05-01 Thread Michael Hearne
I'm noticing strange behavior with the legend function when used in  
combination with matplotlib. If I do the following:

import datetime
from pylab import *
date1 = datetime.date( 1952, 1, 1 )
date2 = datetime.date( 2004, 4, 12 )
delta = datetime.timedelta(days=100)
dates = drange(date1, date2, delta)
s1 = rand(len(dates))
plot_date(dates, s1,'r.')
hold(True)
s2 = rand(len(dates))
plot_date(dates, s2,'bo')
legend(('s1','s2'))

The resulting legend shows the symbols twice (two little red dots and  
two blue ones).  Does anyone else get this, and if so, do you know  
what the problem is?

--Mike



--
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
--



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plot_date and legend

2008-05-01 Thread Michael Hearne
Contents of matplotlib.__version__
'0.98pre'

My Matplotlib is from the SciPy SuperPack for Mac OS X  from 
http://macinscience.org/?page_id=6
On May 1, 2008, at 3:32 PM, Michael Hearne wrote:

 I'm noticing strange behavior with the legend function when used in  
 combination with matplotlib. If I do the following:

 import datetime
 from pylab import *
 date1 = datetime.date( 1952, 1, 1 )
 date2 = datetime.date( 2004, 4, 12 )
 delta = datetime.timedelta(days=100)
 dates = drange(date1, date2, delta)
 s1 = rand(len(dates))
 plot_date(dates, s1,'r.')
 hold(True)
 s2 = rand(len(dates))
 plot_date(dates, s2,'bo')
 legend(('s1','s2'))

 The resulting legend shows the symbols twice (two little red dots  
 and two blue ones).  Does anyone else get this, and if so, do you  
 know what the problem is?

 --Mike



 --
 Michael Hearne
 [EMAIL PROTECTED]
 (303) 273-8620
 USGS National Earthquake Information Center
 1711 Illinois St. Golden CO 80401
 Senior Software Engineer
 Synergetics, Inc.
 --






--
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
--



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users