Line plots and missing data

When you do a line scatter plot in excel and data is missing between
two observations excel doesn't connect those two observations with a
line. So what you see is a line with gaps where the data is missing.
Missing data is
defined as having x values but no y value or vice versa. Is there a
good way to get similar behavior in matplotlib?

I tried to attach a bmp that had an example but the mail server
rejected it on the grounds it was too large.

--Tom

If you are using 0.87.3, you can do this:

plot([1.1, 2, nan, 3, 5])

···

On Tuesday 27 June 2006 14:16, Tom Denniston wrote:

When you do a line scatter plot in excel and data is missing between
two observations excel doesn't connect those two observations with a
line. So what you see is a line with gaps where the data is missing.
Missing data is
defined as having x values but no y value or vice versa. Is there a
good way to get similar behavior in matplotlib?

Thanks John and Darren. I think i'll use the nan trick for now but
the masked array looks incredibly powerful. I'll take a look at the
masked array demo. Thanks once again for your help and some really
awesome plotting software!

--Tom

···

On 6/27/06, Darren Dale <dd55@...163...> wrote:

On Tuesday 27 June 2006 14:16, Tom Denniston wrote:
> When you do a line scatter plot in excel and data is missing between
> two observations excel doesn't connect those two observations with a
> line. So what you see is a line with gaps where the data is missing.
> Missing data is
> defined as having x values but no y value or vice versa. Is there a
> good way to get similar behavior in matplotlib?

If you are using 0.87.3, you can do this:

plot([1.1, 2, nan, 3, 5])

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options