Message Boards Message Boards

[✓] Use InterpolationOrder 2 or higher in a Manipulate?

GROUPS:

Dear All,

InterpolationOrder in Manipulate are working in orders 0 and 1 but not in order 2 or higher, why?

Please can you help?

fakedata1 =
  {{{2006, 1, 1}, 27}, {{2006, 1, 2}, 25}, {{2006, 1, 3}, 
    86}, {{2006, 1, 4}, 72}, {{2006, 1, 5}, 66}, {{2006, 1, 6}, 
    18}, {{2006, 1, 7}, 13}, {{2006, 1, 8}, 7}, {{2006, 1, 9}, 
    84}, {{2006, 1, 10}, 0}, {{2006, 1, 11}, 19}, {{2006, 1, 12}, 
    50}, {{2006, 1, 13}, 12}, {{2006, 1, 14}, 41}, {{2006, 1, 15}, 
    21}, {{2006, 1, 16}, 46}, {{2006, 1, 17}, 82}, {{2006, 1, 18}, 
    0}, {{2006, 1, 19}, 74}, {{2006, 1, 20}, 21}};
fakedata2 =
  {{{2006, 1, 1}, 33}, {{2006, 1, 2}, 36}, {{2006, 1, 3}, 
    100}, {{2006, 1, 4}, 100}, {{2006, 1, 5}, 76}, {{2006, 1, 6}, 
    21}, {{2006, 1, 7}, 27}, {{2006, 1, 8}, 13}, {{2006, 1, 9}, 
    100}, {{2006, 1, 10}, 0}, {{2006, 1, 11}, 38}, {{2006, 1, 12}, 
    100}, {{2006, 1, 13}, 29}, {{2006, 1, 14}, 100}, {{2006, 1, 15}, 
    57}, {{2006, 1, 16}, 65}, {{2006, 1, 17}, 100}, {{2006, 1, 18}, 
    0}, {{2006, 1, 19}, 100}, {{2006, 1, 20}, 64}};
Manipulate[
 DateListPlot[
  {Sdata20[[1 ;; fakedata1]]
   , Hdata20[[1 ;; fakedata2]]}
  , Joined -> True
  , FrameTicks -> {{All, None}, {All, None}}
  , Filling -> Axis
  , FillingStyle -> Automatic
  , PlotRange -> Automatic
  , ImageSize -> 600
  , AspectRatio -> 1/4
  , InterpolationOrder -> 1 (* 
  InterpolationOrder are not working in order 2 or higher *)
  ]
 , {fakedata1, 1, Length[Sdata20], 1}
 , {fakedata2, 1, Length[Hdata20], 1}
 ]

enter image description here

Best Regards,...Jos

POSTED BY: Jos Klaps
Answer
21 days ago

Works for me as long as the initial number of points for fakedata1 and fakedata2 is great enough to support the interpolation order. (E.g. need >= 3 points for InterpolationOrder -> 2, etc.)

POSTED BY: Michael Rogers
Answer
21 days ago

Group Abstract Group Abstract