Yes,

I am plotting two lines and am using two plots, the two lines plots just fine in different colors, however, one line is continuous from 1983 – 1995 and the other dataset has irregular data points along the same period of time.  So I should see a continuous line for the first data set and I should see a broken line only where there is data for the second.  Matplotlib is joining the broken points and forces both datasets to appear as continuous.

 

What do you think is the solution?

Thanks

Joseph

 


From: Michael Schwager [mailto:hws@cypress.com]
Sent: Friday, July 21, 2006 2:33 PM
To: Rodrigues, Joseph; matplotlib-users@lists.sourceforge.net
Subject: RE: [Matplotlib-users] iregular data set

 

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@lists.sourceforge.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?