InterpolationOrder -> 2 does not work (error) in Manipulate

Hi,

Can someone tell me why InterpolationOrder ->2 or 3 etc. does not work in Manipulate?

See file attached.

DateListPlot[
{Sdata2014[[1 ;; Test]]
, Hdata2014[[1 ;; Test]]}
, Joined → True
, Filling → {1 → {{2}, Red}}
, PlotStyle → White
, InterpolationOrder → 2]
, {Test, 1, Length[Sdata2014], 1}
]

The documentation for DateListPlot does not list InterpolationOrder as an option.

Hi,

InterpolationOrder is indeed an option for DateListPlot, set by default to None. This can be checked by evaluating

Options[DateListPlot]

InterpolationOrder works fine in Manipulate. The error comes from the minimum value given to Test. For instance for an InterpolationOrder of 3, one should set it to 4 at least.

Manipulate[
 DateListPlot[
    {Sdata2014[[1 ;; Test]], Hdata2014[[1 ;; Test]]}, 
    Joined -> True, Filling -> {1 -> {{2}, Red}}, PlotStyle -> White, InterpolationOrder -> 3], 
{Test, 4, Length[Sdata2014], 1}]

This allows the option to have enough data (here from the tables Sdata2014 and Hdata2014) for the interpolation to be done. InterpolationOrder - > n uses a polynomial of degree n, so I think it expects a set of at least n points to make the interpolation, otherwise it returns an error.

If the minimal value to Test in the above example was set to a smaller value, say 1, you would get an error for every value up to 3 (even though you will still be able to manipulate the output in any case).

Hi Xavier,

Thank you very much for your help and professional explanations. This was really what I needed.

Kind regards,…Jos