How to show the animation control by default

南笙酒味 提交于 2019-12-07 01:22:49

问题


In this simple control object in mathematica like the following,

Control[{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.


回答1:


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"}]

do what you want?




回答2:


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...



来源:https://stackoverflow.com/questions/6291282/how-to-show-the-animation-control-by-default

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!