iregular data set

Thanks to all who replied.
I am not sure if I get this or if I am not clear on what I want. So I
am attaching a simple web page of what I want vs. what I get from
matplotlib.
Thanks again,
Joseph

Book1.htm (21.6 KB)

···

-----Original Message-----
From: matplotlib-users-bounces@lists.sourceforge.net
[mailto:matplotlib-users-bounces@lists.sourceforge.net] On Behalf Of
Bill Dandreta
Sent: Friday, July 21, 2006 3:09 PM
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] iregular data set

Rodrigues, Joseph wrote:

I have a question (new user here): I have datasets of irregular time
spaced data and am having a problem with Matplot lib.

I am plotting two datasets: one is continuous time series data (simple
line chart) and the other irregular time series data.

The problem I have is: MatPlotLib is interpolating data for the
irregular data where there is no data.

So if I have data from 1985 - 1989 then no data for 1990 - 1994,
matplotlib is drawing a line connecting the missing data.

How does one plot irregular spaced time series data?

The way I do that is index the time data and plot against the index.

1985--0
1986--1
.
.
.
1989--4
1995--5
etc.

Bill

------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Joseph,
I'm a big fan of masked arrays in numpy. Your problem is typically what masked
days are for: you can find an example here:
http://www.scipy.org/Cookbook/Matplotlib/Plotting_values_with_masked_arrays