| 1 | initial version |
You'll also need to use Graphics() prior to your for loop to define p1 and p2 to be graphics objects. (As an option, you could use the += assignment to shorten the code.)
t=var('t')
p1=Graphics()
p2=Graphics()
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)
| 2 | No.2 Revision |
You'll also need to use Graphics() prior to your for loop to define p1 and p2 to be graphics objects. (As an option, you could use the += assignment to shorten the code.)
t=var('t')
p1=Graphics()
p2=Graphics()
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)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.