2
$\begingroup$

bug fixed in 10.4.1

Can any one try this code and see if it is updating continuously without changing the controllers:

data = MapThread[
     Prepend[#2, #1] &, {DateList /@ 
       RandomReal[
        AbsoluteTime[#] & /@ {{2015, 1, 1}, {2015, 12, 30}}, #], 
  RandomReal[20, {#, 5}]}] &@5;
DynamicModule[{i, ii},
 Column[{
   Manipulator[Dynamic[i], {2, 6, 1}],
   Control[{{ii, 3}, {3, 4, 6}}],
   Row[{Dynamic@
      DateListPlot[data[[;; , {1, i}]], PlotRange -> All, 
       ImageSize -> 400, PlotLabel -> RandomReal[], 
       PlotStyle -> Hue[RandomReal[]]],
     Dynamic@
      DateListPlot[data[[;; , {1, ii}]], PlotRange -> All, 
       ImageSize -> 400, PlotLabel -> RandomReal[], 
       PlotStyle -> Hue[RandomReal[]]]}]
   }]
 ]

If you remove one of the plots then the code works fine without problem. If you use Manipulate and remove all controllers and Dynamic then the code will work fine.

Edit

there can also be several plots where some plots use the same manipulator symbol.

Update:

I sent this case to wolfram and they have confirmed it is incorrect behavior and the case has been sent to developers

$\endgroup$
  • $\begingroup$ Does using TrackedSymbols ensure that the Manipulate will only reevaluate the object(s) depending on the tracked symbols when they actually change? $\endgroup$ – John McGee Dec 1 '15 at 12:21
  • $\begingroup$ @MikeHoneychurch, that dose not help when you have several plots where some plots use same manipulator symbol. $\endgroup$ – Algohi Dec 3 '15 at 17:54
  • $\begingroup$ since you are adding new information in your comment, and therefore your question does not contain a minimal working example of what you want solved, I am voting to close $\endgroup$ – Mike Honeychurch Dec 3 '15 at 23:33
  • 1
    $\begingroup$ I see no continuous updating in v9.0.1 and v8.0.4 win 64bit. $\endgroup$ – xzczd Dec 4 '15 at 5:43
3
$\begingroup$

I'm adding this to put Mike Honeychurch's comment on record as an answer.

SeedRandom[42]; 
data = 
  MapThread[
    Prepend[#2, #1] &, 
    {DateList /@ RandomReal[AbsoluteTime[#] & /@ {{2015, 1, 1}, {2015, 12, 30}}, #], 
     RandomReal[20, {#, 5}]}] & @ 5;

plot = 
  DateListPlot[data[[;; , {1, #}]], 
    PlotRange -> All, ImageSize -> 400, PlotLabel -> RandomReal[], 
    PlotStyle -> Hue[RandomReal[]]] &;

DynamicModule[{i, ii},
  Column[{
    Manipulator[Dynamic[i], {2, 6, 1}],
    Control[{{ii, 3}, {3, 4, 6}}],
    Row[{
      Dynamic[plot[i], TrackedSymbols :> {i}], 
      Dynamic[plot[ii], TrackedSymbols :> {ii}]}]}]]

plots

No continuous updating of the plots in the above version.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.