Re: [Matplotlib-users] pylab.semilogy() line plots and missing data

2006-07-17 Thread Darren Dale
On Sunday 16 July 2006 19:38, Webb Sprague wrote: > I have data with missing values represented by nans (like array([1.0, > nan, 3.0]) that I am plotting with pylab.semilogy(). Unfortunately, > the lines are getting connected through the nans, while I was hoping > they would be left empty. If som

Re: [Matplotlib-users] pylab.semilogy() line plots and missing data

2006-07-16 Thread Darren Dale
On Sunday 16 July 2006 7:43 pm, PGM wrote: > On Sunday 16 July 2006 19:38, Webb Sprague wrote: > > I have data with missing values represented by nans (like array([1.0, > > nan, 3.0]) that I am plotting with pylab.semilogy(). > > Please transform your array in a MaskedArray. No, this is a bug that

Re: [Matplotlib-users] pylab.semilogy() line plots and missing data

2006-07-16 Thread Webb Sprague
Masked arrays seem to do the trick. Is there a reason why the nan thing won't work? On 7/16/06, PGM <[EMAIL PROTECTED]> wrote: > On Sunday 16 July 2006 19:38, Webb Sprague wrote: > > I have data with missing values represented by nans (like array([1.0, > > nan, 3.0]) that I am plotting with pylab

Re: [Matplotlib-users] pylab.semilogy() line plots and missing data

2006-07-16 Thread PGM
On Sunday 16 July 2006 19:38, Webb Sprague wrote: > I have data with missing values represented by nans (like array([1.0, > nan, 3.0]) that I am plotting with pylab.semilogy(). Please transform your array in a MaskedArray. import numpy as N masked_x=N.ma.masked_where(N.isnan(x),x) That should do

[Matplotlib-users] pylab.semilogy() line plots and missing data

2006-07-16 Thread Webb Sprague
I have data with missing values represented by nans (like array([1.0, nan, 3.0]) that I am plotting with pylab.semilogy(). Unfortunately, the lines are getting connected through the nans, while I was hoping they would be left empty. If someone could tell me how to get empty lines, that would be g