[SciPy-User] pylab
Warren Weckesser
warren.weckesser at enthought.com
Mon Jul 19 20:01:02 EDT 2010
Andreas wrote:
>> works fine. But what if I have one or more data points missing in my y
>>
> data set? like this
>
>>> x = [1,2,3,4]
>>> y=[10,20, ,40]
>>> pylab.plot(x,y)
>>> pylab.show()
>>>
>
> take a look at numpy.masked_array. matplotlib can handle masked arrays.
>
>
It also skips nan's. E.g.
In [21]: x = range(10)
In [22]: y = [10,20,25,nan,40,10,15,nan,40,50]
In [23]: plot(x, y, 'bo-')
(I'm using ipython with the -pylab option, so 'nan' is really 'numpy.nan'.)
Warren
> cheers,
>
> a.
>
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list