On Mon, May 19, 2014 at 6:39 AM, Pierre-Vincent Quéré <[email protected]> wrote: > Hello, > > The lines below use to work a few months ago (to draw a polygon). But today, > see the error I can read... > I've tried many times, many solutions, but none worked... > Any idea, please ? > >> L=[1+i,4+i,4+2*i,2+2*i,2+3*i,1+3*i,1+i] >>list_plot(L,plotjoined=True,aspect_ratio=1)
Evidently something changed in Sage that broke your code. Maybe there should have been a deprecation warning (not sure). In any case, this works: L=[1+i,4+i,4+2*i,2+2*i,2+3*i,1+3*i,1+i] v = [(z.real(), z.imag()) for z in L] list_plot(v, plotjoined=True, aspect_ratio=1) > > Error in lines 1-1\nTraceback (most recent call last):\n File > \"/projects/81a29e12-5b83-43da-bfc5-0736f532b501/.sagemathcloud/sage_server.py\", > line 733, in execute\n exec compile(block+'\\n', '', 'single') in > namespace, locals\n File \"\", line 1, in <module>\n File > \"/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/misc/decorators.py\", > line 550, in wrapper\n return func(*args, **options)\n File > \"/usr/local/sage/sage-6.2.rc0/local/lib/python2.7/site-packages/sage/plot/plot.py\", > line 1810, in list_plot\n data = [(z.real(), z.imag()) for z in [CC(z[1]) > for z in data]]\nTypeError: 'sage.symbolic.expression.Expression' object > does not support indexing\n" > > Thanks and sorry for disturbing, > > > ################################################ > Pierre-Vincent Quéré > Professeur de mathématiques et d'informatique appliquée > Responsable pédagogique et administratif du cycle préparatoire 1ère année > Ecole Nationale Supérieure de Chimie de Rennes > Bureau 018 > 11 allée de Beaulieu > CS 50837 > F-35708 RENNES Cedex 7 > Tél: +33 (0)2 23 23 81 38 > > > [email protected] > http://www.ensc-rennes.fr > > N'imprimez que si nécessaire! > > > > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
