[SciPy-user] scikit.timeseries plotting bugs?

Dharhas Pothina Dharhas.Pothina@twdb.state.tx...
Fri Dec 5 10:11:34 CST 2008

@ Tim :

>> fseries_freq = fseries.convert(freq=freq, func=mean) 
> from a quick look you seem not to have specified freq here.

 I had pasted a piece of a script. The value of freq is passed in from the command line.

@ Pierre :

>> If I use two commands and certain other symbols like 'b',b--' etc  
>> for the first series, it only plots the second series :
> ??? can't reproduce this one...

I've double checked, its happening consistently with multiple datasets (The datasets are similar just at different locations). How do I track down the problem? Should I send you a datafile and my short script?

@ Matt & Pierre :

So if I understand correctly if I plot multiple time series with different frequencies it should use the .asfreq method to transform the other series to the first series frequency. I want to make sure I understand .asfreq correctly. 

1) If .asfreq is converting to a higher frequency the data stays the same and extra dates are added with no data/masked values
2) If converting to a lower frequency multiple data points end up on the same date

Implications of this are that for what I am trying to do I need to put the highest frequency plot first.

> That's actually not the way it was designed. In normal procedure, you  
> create a tsplot with a time_series attached. The plot gets its  
> frequency from this series, and all the series that are plotted are  
> transformed to the plot frequency uisng their .asfreq method: in other  
> terms, you don;t change the data, just the representation of the  
> dates. It's quite convenient and I don't see why we should raise an  
> exception. Issue a warning, perhaps, but let it work. <note_to_self>  
> need to document that </note_to_self>

Another question. How do I set the x limits. In my plot the two timeseries go from 12/15/05 - 04/01/07 & from 01/01/06 - 12/31/06. If I do not specify the x limits the x ticks and labels look very nice and well spaced. However, if I try to limit the plot to a date range by using fsp.set_xlim(startdate,enddate) where startdate and enddate are datetimes, it works but the major/minor ticks don't look correct and labeling looks bad.


- dharhas 

More information about the SciPy-user mailing list