# multiple parametric_plot's with for loop

 1 I'm studying differential geometry of curves and surfaces, and I have a question regarding multiple plots on one graphics, that is i want to plot multiple lines on one plot in for loop, but when I try to do that it shows only the last plot... a,b,v,u = var('a b v u'); rectangular=(a,b,v); z=0; for i in range(81): z=i*pi/20;z pt=plot3d(z*v,(v,0,5),(a,0,5),(b,0,5),transformation=rectangular,plot_points=80,color="blue") show(pt)  asked May 21 '12 This post is a wiki. Anyone with karma >150 is welcome to improve it. calc314 2225 ● 7 ● 25 ● 62

 2 You have to 'add' the plots. I guess you want do something like the following: a,b,v,u = var('a b v u'); rectangular=(a,b,v); pt = Graphics() for i in range(3): z=i*pi/20 pt += plot3d(z*v,(v,0,5),(a,0,5),(b,0,5),transformation=rectangular,plot_points=80,opacity=0.5) show(pt)  alternatively you can use list comprehension plots = [ plot3d(i*pi/20*v,(v,0,5),(a,0,5),(b,0,5),transformation=rectangular,plot_points=80 ) for i in range(3) ] show(sum(plots))  answered May 21 '12 This post is a wiki. Anyone with karma >150 is welcome to improve it. ndomes 791 ● 7 ● 22

[hide preview]