30
$\begingroup$

Can you set the speed at which a Manipulate plays when the play button is clicked?

$\endgroup$

2 Answers 2

33
$\begingroup$

AnimationRate is at least one way to do this, and it can be applied on a per-control basis:

Manipulate[x, {x, 0, 10, AnimationRate -> 1/10, Appearance -> "Open"}]

Manipulate[x, {x, 0, 10, AnimationRate -> 10, Appearance -> "Open"}]
$\endgroup$
3
  • $\begingroup$ I couldn't see this option in the online documentation for Manipulate - although it can be easy to miss things. If it isn't there I think it would be a good addition. $\endgroup$
    – cormullion
    May 16, 2012 at 6:20
  • 1
    $\begingroup$ What is the Appearance -> "Open" doing? $\endgroup$
    – a06e
    Jan 28, 2016 at 10:03
  • 3
    $\begingroup$ @becko It allows the play button to be visible without needing to first click the '+' next to the slider. $\endgroup$ Jan 28, 2016 at 15:27
15
$\begingroup$

I presume you are looking for AnimationRate.
Also, if you want smooth motion you should consider RefreshRate.

Manipulate[
 Plot[Sin[x + a], {x, 0, 5 Pi}],
 {a, 0, 2 Pi, ControlType -> Animator, AnimationRate -> 1, RefreshRate -> 60}
]
$\endgroup$

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.