[SciPy-user] scikits.timeseries fill between two curves
Mon Mar 9 09:31:42 CDT 2009
Thank you. I had to upgrade matplotlib since fill_between isn't part of 0.98.3 which is what I had installed.
>>> Pierre GM <firstname.lastname@example.org> 3/6/2009 3:11 PM >>>
Not directly, but there is some workaround. After all, a
TimeSeriesPlot is only a subclass of SubPlot, so all its methods are
available. Keep in mind that the dates are just an array of integers
used for the xaxis. You can access it with the `xdata` attribute.
For example, the following code works:
from scikits.timeseries.lib import moving_funcs as mf
import scikits.timeseries.lib.plotlib as tpl
coseries = ts.time_series(np.cos(np.arange(36)),
snseries = ts.time_series(np.cos(np.arange(36)+3),
fsp = tpl.gca()
fsp.fill_between(fsp.xdata, coseries, snseries, color='grey')
On Mar 6, 2009, at 3:26 PM, Dharhas Pothina wrote:
> I was wondering if there was a way to shade the region between two
> curves on a scikits.timeseries plot. I see that matplotlib has a
> fill_between() function and I was wondering if there was a way to
> use that in a tsplot.
> - dharhas
> SciPy-user mailing list
More information about the SciPy-user