[SciPy-user] [timeseries] Missing dates

Matt Knox mattknox.ca at gmail.com
Sun Apr 5 15:04:29 EDT 2009


> In chaco a plot's index and values are in seperate data sources, which
> means timeseries with different frequencies require different indexes.
>  I'll talk with one of their devs to see what's the best approach to
> deal with that.
> 
> I'm assuming you merge the index axis somehow in matplotlib when
> plotting series with different frequencies?  So if I were to plot
> something with a business frequency for the entire year 2009, and on
> the same figure plot a series with daily frequency just in January I'm
> guessing weekends will show up as gaps in the first plot?  Just for
> january or for the entire year?

I would generally recommend explicitly converting all the time series that you
want to plot to the same frequency first rather than relying on the implicit
conversion to avoid any unexpected behavior.

Also, I don't use chaco personally, but if you come up with some good strategies
for plotting TimeSeries objects with it that you can share with us, it may make
a nice addition to the plotlib submodule in the timeseries package.

And while we are on the topic of time series plotting... you may have noticed
that matplotlib, chaco and the timeseries module all implement their own
separate logic for date/time axis label auto scaling. I haven't used chaco, but
in my (biased) opinion, the timeseries module currently does a better job at
this than the plot_date function in matplotlib (although it is not perfect and
there is still room for improvement). The plot_date auto_scaling does not handle
all levels of zoom well (you can get overlapping labels at many zoom levels) and
so far as I can tell will not work well with "business" frequency data (forces
it to a "daily" plot with missing values on weekends). I would be interested to
hear your thoughts on chaco's scaling compared to the timeseries module,
particularly for business frequency and other non-daily types of data.

- Matt





More information about the SciPy-User mailing list