Ask Your Question

Insaneg33k's profile - activity

2017-12-21 03:02:12 -0500 received badge  Popular Question (source)
2017-07-14 09:51:21 -0500 received badge  Popular Question (source)
2015-10-14 10:15:09 -0500 received badge  Taxonomist
2012-08-04 05:53:38 -0500 asked a question Multiple loops in an animation?

I want to use two loops to produce an animation of some gridlines changing gradient.

Essentially making all these lines:

for i in range(-5,5,1):
    p1 +=parametric_plot((t,i),(t,-5,5),color="red")
    p2 +=parametric_plot((i,t),(t,-5,5),color="blue")

Move like these lines all at once:

v = []
for a in srange(-5,5,1):
    p1 =parametric_plot((t,t*a),(t,-5,5),color="red")
    p2 =parametric_plot((t*a,t),(t,-5,5),color="blue")
j = animate (v, xmin=-2,ymin=-2,xmax=2,ymax=2,figsize=[2,2])

How can I combine these two into one animation?

2012-06-08 06:35:03 -0500 commented answer Add graphs produced by a for loop?

Thanks this is a nice consice way of doing it.

2012-06-08 06:34:14 -0500 commented answer Add graphs produced by a for loop?

Thanks, thats exactly what i was looking for! You have pointed me in the right direction! :)

2012-06-08 06:31:30 -0500 received badge  Supporter (source)
2012-06-08 05:03:42 -0500 received badge  Editor (source)
2012-06-08 05:01:40 -0500 asked a question Add graphs produced by a for loop?

How can I plot all my graphs that i produce from a for loop on top of each other? I have this:

for i in range(-3,3,1):

    p1 = parametric_plot((t,i),(t,-5,5),color="red")

    p2 = parametric_plot((i,t),(t,-5,5),color="gray")


I just get all the graphs one after the other.