3
$\begingroup$

The following animation:

Manipulate[
 Plot[i*Sin[x], {x, 0, 2*Pi}, PlotRange -> 10], {i, 1, 10, 
  ControlType -> Animator}]

Gives:

enter image description here

How can I exchange Slider and Play Button Position, like that:

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

You can have two controls, an Animator and a Slider (or a Manipulator), both tied to the same variable:

Manipulate[Plot[i*Sin[x], {x, 0, 2*Pi}, PlotRange -> 10], 
 Row[{Control[{i, 1, 10, Animator,  AppearanceElements -> {"StepLeftButton", 
   "StepRightButton", "PlayPauseButton", "FasterSlowerButtons", "DirectionButton"}}],
  Control[{{i, 1, ""}, 1, 10, Slider}]}]]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks a lot for this answer ! This is great ! I just think that you forgot to put "ControlType ->" before Animator. $\endgroup$
    – james
    Commented Sep 6, 2018 at 9:18
  • $\begingroup$ @james, my pleasure. You can have ControlType -> Animator or just Animator; both work. $\endgroup$
    – kglr
    Commented Sep 6, 2018 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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