0
$\begingroup$

When I first made the animation below the slider was above the frame. Now it has jumped to the left of the plot. It steals screen space. How do I get it above the plot? What could have happened to make it move? Version 13.0 for Windows.

enter image description here

Could this be related to the new screen I had to have for my laptop yesterday?

The code to make the animation is first this module

ClearAll[clampedFree];
clampedFree::usage = 
  "clampedFree[Length,x, n] gives {k, mode shape} for mode n";
clampedFree[L_, x_, n_] := 
 Module[{mat, k , rt, kL, mat1, ns, A1, A2, A3, A4, ms},
  mat = {{1, 0, 1, 0}, {0, k, 0, k}, {-k^2 Cos[k L], -k^2 Sin[k L], 
     k^2 Cosh[k L], k^2 Sinh[k L]}, {k^3 Sin[k L], -k^3 Cos[k L], 
     k^3 Sinh[k L], k^3 Cosh[k L]}};
  rt = kL /. 
    FindRoot[1 + Cos[kL] Cosh[kL], {kL, π/2 + π (n - 1)}, 
     WorkingPrecision -> 50];
   k = rt/L;
  ns = NullSpace[mat];
  ms = A1 Cos[k x] + A2 Sin[k x] + A3 Cosh[k x] + A4 Sinh[k x] /. 
    Thread[{A1, A2, A3, A4} -> ns[[1]]];
  
  {k, ms/(ms /. x -> L)}
  ]

ClearAll[fn, ms];
Table[{fn[n], ms[n]} = clampedFree[5, x, n], {n, 10}];

Then in a new cell the following

DynamicModule[{ar = 10, rr = 30},
 Animate[
  Plot[Evaluate[Table[
     Sin[2 π fn[n] t] ms[n],
     {n, 5}]], {x, 0, 5}, PlotRange -> {All, {-1, 1}}, 
   AspectRatio -> 1/4, ImageSize -> 11 72],
  {t, 0, 10}, SaveDefinitions -> True, AnimationRate -> Dynamic[ar], 
  RefreshRate -> Dynamic[rr]]
 ]

Any ideas? I can't find a position option for the location of the animator slider.

$\endgroup$
2
  • 4
    $\begingroup$ I cannot reproduce this; however, you can include the option ControlPlacement -> Top in the Animate $\endgroup$
    – Bob Hanlon
    Jan 13 at 1:26
  • $\begingroup$ Strange you can't reproduce. ControlPlacement-> Top works well. Another option I had not come across. Thanks @BobHanlon $\endgroup$
    – Hugh
    Jan 13 at 10:39

Browse other questions tagged or ask your own question.