Gerrit Kuhlmann, on 2011-03-25 14:26,  wrote:
> Hi all,
> 
> I get a ValueError, if I try to plot a list of numpy.nans against
> datetime objects. I'm using Python 2.6.5 and Matplotlib 1.0.1 on Ubuntu
> Linux 10.04. Code and traceback are below.
> 
> Best regards,
> Gerrit
> 
> 
> 
> Code
> """"
> import matplotlib.pyplot as plt
> import numpy as np
> from datetime import datetime as DateTime
> 
> t = [DateTime(2011,1,day) for day in xrange(1,20)]
> x = [np.nan for i in xrange(1,20)]
> 
> plt.plot(t,x)
> plt.show()

Hi Gerrit,

Thanks for the report, though I'm not sure what you expect to
happen here?

Changing at least one of the elements of x to be something other
than nan does not cause the error.

There is an inconsistency, though, in that plt.plot(x,x) when x
is full of nans does not cause any errors.

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to