Ask Your Question
0

Dancing x-axis in animation [solved]

asked 2013-04-01 14:29:49 +0100

Raul gravatar image

updated 2013-04-01 14:50:10 +0100

vdelecroix gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-01 14:36:00 +0100

Raul gravatar image

updated 2013-04-01 14:50:59 +0100

vdelecroix gravatar image

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

edit flag offensive delete link more

Comments

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

process91 gravatar imageprocess91 ( 2014-02-19 18:08:39 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-01 14:29:49 +0100

Seen: 379 times

Last updated: Apr 01 '13