开发者

How to show the animation control by default

开发者 https://www.devze.com 2023-03-11 07:16 出处:网络
In this simple control object in mathematica like the following, C开发者_运维问答ontrol[{x, 0, 1}]

In this simple control object in mathematica like the following,

C开发者_运维问答ontrol[{x, 0, 1}]

we have to bring the mouse pointer to the right upper corner of the object to get the hint called "Show Animation Controls" and then click it to see the animation controls like play, step forward etc. Is there a way by setting some options to get all the animation controls OPEN by default so that when one opens a notebook containing dynamic object the animation controls remains open?

Anybody knows such a magic option in Mathematica?

As suggested the following code from documentation center

Manipulator[0.3, Appearance -> "Open"]

looks fine and does suits my purpose but how the same can be done with in the following? How can we keep the animation control in Manipulate open by default?

Manipulate[Plot[Sin[a x + b], {x, 0, 6}], {a, 1, 4}, {b, 0, 10}]

This was my actual question that still baffles me unfortunately.


For example, Manipulator[Dynamic[x], {0, 2}, Appearance \[Rule] "Open"].

Can you give more details on what you are trying to do?

EDIT: Does this

Manipulate[
  Plot[Sin[a x + b], {x, 0, 6}],
   {a, 1, 4, Appearance \[Rule] "Open"}, {b, 0, 10, Appearance \[Rule] "Open"}]

How to show the animation control by default

do what you want?


Control is a magical command which guesses the type of controller you want from the arguments you give it. The default one you produced with Control[{x,0,1}] is actually a Manipulator - to have it open from the start you want

Manipulator[x, {0, 1}, Appearance -> "Open"]

Of course x should normally by a Dynamic object.

Another option, if you really want to have a control to simply animate something, is to use

Animator[Dynamic[x], {0, 1}, (*AnimationRunning -> False*)]

where you can uncomment the option if you don't want the animation running when the output is created.


Aside: I had completely misread what acl said in his answer - and it turned out to be the same as what I ended up saing. I should probably just move my comments to a comment in his answer...

0

精彩评论

暂无评论...
验证码 换一张
取 消