2022-04-11 13:56:51 +0200 received badge ● Notable Question (source) 2021-01-22 02:01:06 +0200 received badge ● Student (source) 2021-01-22 02:00:34 +0200 received badge ● Notable Question (source) 2017-12-21 10:02:12 +0200 received badge ● Popular Question (source) 2017-07-14 16:51:21 +0200 received badge ● Popular Question (source) 2015-10-14 17:15:09 +0200 received badge ● Taxonomist 2012-08-04 12:53:38 +0200 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: t=var('t') p1=Graphics() p2=Graphics() 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") show(p1+p2)  Move like these lines all at once: t=var('t') p1=Graphics() p2=Graphics() 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") v.append(p1+p2) j = animate (v, xmin=-2,ymin=-2,xmax=2,ymax=2,figsize=[2,2]) j.show()  How can I combine these two into one animation? 2012-06-08 13:35:03 +0200 commented answer Add graphs produced by a for loop? Thanks this is a nice consice way of doing it. 2012-06-08 13:34:14 +0200 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 13:31:30 +0200 received badge ● Supporter (source) 2012-06-08 12:03:42 +0200 received badge ● Editor (source) 2012-06-08 12:01:40 +0200 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") show(p1+p2)  I just get all the graphs one after the other.