iregular data set

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?

Thanks

Joseph

p.s.: if this is the wrong forum, could you let me know where
to post?

Hi, I’m also new to matplotlib, but
this sounds like a general type of problem you might in find in matlab
too. I think you are trying to plot two separate lines, one for the first
set of time and one for the second set of time. If you don’t want
them connected then you must issue two plot() commands, which means you have to
split the data into the sections that you want connected.

Michael

···

From:
matplotlib-users-bounces@lists.sourceforge.net
[mailto:matplotlib-users-bounces@lists.sourceforge.net] On Behalf Of Rodrigues, Joseph
Sent: Friday, July 21, 2006 11:25
AM
To: matplotlib-users@…813…ourceforge.net
Subject: [Matplotlib-users]
iregular data set

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?

Thanks

Joseph

p.s.: if this is the wrong forum, could
you let me know where to post?

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

You want to use matplotlib.numerix and use a masked array

···

On Fri, 2006-07-21 at 14:24 -0400, 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?

Thanks

Joseph

p.s.: if this is the wrong forum, could you let me know where to post?

-------------------------------------------------------------------------
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=DEVDEV
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options

--
Rick Albright
Senior Quantitvative Analyst
Indie Research, LLC
254 Witherspoon Street
Princeton, NJ 08542
(609)497-1030
ralbright@...1184...