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

**URL:** <https://community.wolfram.com/t/interpolationorder-2-does-not-work-error-in-manipulate/6321>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [July 31, 2015, 10:49pm UTC](https://community.wolfram.com/t/interpolationorder-2-does-not-work-error-in-manipulate/6321 "2015-07-31T22:49:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![josklaps1](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/josklaps1/32/22044_2.png) [@josklaps1](https://community.wolfram.com/u/josklaps1)\
**Post date:** [July 31, 2015, 10:49pm UTC](https://community.wolfram.com/t/interpolationorder-2-does-not-work-error-in-manipulate/6321/1 "2015-07-31T22:49:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [August 1, 2015, 1:21pm UTC](https://community.wolfram.com/t/interpolationorder-2-does-not-work-error-in-manipulate/6321/2 "2015-08-01T13:21:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xroy](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/xroy/32/5066_2.png) [@xroy](https://community.wolfram.com/u/xroy)\
**Post date:** [August 1, 2015, 2:05pm UTC](https://community.wolfram.com/t/interpolationorder-2-does-not-work-error-in-manipulate/6321/3 "2015-08-01T14:05:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![josklaps1](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/josklaps1/32/22044_2.png) [@josklaps1](https://community.wolfram.com/u/josklaps1)\
**Post date:** [August 1, 2015, 7:22pm UTC](https://community.wolfram.com/t/interpolationorder-2-does-not-work-error-in-manipulate/6321/4 "2015-08-01T19:22:22Z")

</div>

Hi Xavier,

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

Kind regards,…Jos
