ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 19 Feb 2014 11:08:39 -0600Dancing x-axis in animation [solved]http://ask.sagemath.org/question/9970/dancing-x-axis-in-animation-solved/I'm very new to sage, and I'm trying to make the following animation:
a = animate([sin(20*(x - float(k)))/x for k in srange(0,2*pi,0.5)],
xmin=1, xmax=4, figsize=[3,2])
a.gif(savefile='my_animation.gif', show_path=True)
The problem is that if you look at the animation you'll notice that the x-axis is moving all the time which I find very distracting. Is there a way to tell sage that I want to center the x-axis, so that it stops moving with the animation?Mon, 01 Apr 2013 07:29:49 -0500http://ask.sagemath.org/question/9970/dancing-x-axis-in-animation-solved/Answer by Raul for <p>I'm very new to sage, and I'm trying to make the following animation:</p>
<pre><code>a = animate([sin(20*(x - float(k)))/x for k in srange(0,2*pi,0.5)],
xmin=1, xmax=4, figsize=[3,2])
a.gif(savefile='my_animation.gif', show_path=True)
</code></pre>
<p>The problem is that if you look at the animation you'll notice that the x-axis is moving all the time which I find very distracting. Is there a way to tell sage that I want to center the x-axis, so that it stops moving with the animation?</p>
http://ask.sagemath.org/question/9970/dancing-x-axis-in-animation-solved/?answer=13801#post-id-13801I just found out how to solve the problem, I just changed the first command to
a = animate([sin(20*(x - float(k)))/x for k in srange(0,2*pi,0.5)],
xmin=1, xmax=4, ymin=-1, ymax=1)
Please disregard the question.Mon, 01 Apr 2013 07:36:00 -0500http://ask.sagemath.org/question/9970/dancing-x-axis-in-animation-solved/?answer=13801#post-id-13801Comment by process91 for <p>I just found out how to solve the problem, I just changed the first command to</p>
<pre><code>a = animate([sin(20*(x - float(k)))/x for k in srange(0,2*pi,0.5)],
xmin=1, xmax=4, ymin=-1, ymax=1)
</code></pre>
<p>Please disregard the question.</p>
http://ask.sagemath.org/question/9970/dancing-x-axis-in-animation-solved/?comment=16234#post-id-16234Since you were able to answer your own question, you may click the "accept" icon next to your answer. This is how the site indicates the question as "solved", rather than editing the title of the question.Wed, 19 Feb 2014 11:08:39 -0600http://ask.sagemath.org/question/9970/dancing-x-axis-in-animation-solved/?comment=16234#post-id-16234