Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

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

Posted 9 years ago


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} ]

POSTED BY: Jos Klaps
3 Replies
Posted 9 years ago


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


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.

    {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).

POSTED BY: Xavier Roy

Hi Xavier,

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

Kind regards,......Jos

POSTED BY: Jos Klaps

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

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract