What you wanted was very beautiful, I like it very much. a = [j/pi for j in range(79)] colors = rainbow(len(a)) p1 = plot([circle((-sin(a[i]),cos(a[i])),1, edgecolor = colors[i]) for i in range(len(a))]) p2 = plot([circle((sin(a[i]),-cos(a[i])),1, edgecolor = colors[i]) for i in range(len(a))]) p3 = p1 + p2 show(p3, aspect_ratio = 1, axes = False)
Note how this version doesn't give a possible problem with two different "i"s, and doesn't attempt to use the elements of the list as indices for the list. There are some really good Python tutorials out there which will help get used to these subtleties - I like http://www.greenteapress.com/thinkpython/ though others will have their favorites. Good luck! - kcrisman On Saturday, June 30, 2012 6:43:40 PM UTC-4, Eric Kangas wrote: > > > > a = [i/pi for i in range(79)] > > colors = rainbow(len(a)) > > p1 = plot([circle((-sin(i),cos(i)),1, edgecolor = colors[i]) for i in a]) > > p2 = plot([circle((sin(i),-cos(i)),1, edgecolor = colors[i]) for i in a]) > > p3 = p1 + p2 > > show(p3, aspect_ratio = 1, axes = False) > > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org