[sage-support] how to get a list of terms of expression such as x+z^2 in gap system

2014-09-28 Thread Martin Chan
how to get a list of terms of expression such as x+z^2; how to convert to a list [x, z^2] for for loop to get each terms? -- 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

Re: [sage-support] how to get a list of terms of expression such as x+z^2 in gap system

2014-09-28 Thread Vincent Delecroix
Hello, I am not sure this is what you want sage: var('x,y') (x, y) sage: expr = x + y^2 sage: expr.operands() [y^2, x] Vincent -- 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,

[sage-support] Problem with color and plot

2014-09-28 Thread Christophe Bal
Hello. What am I doing wrong in the following code that display everything in blue ? Christophe -- graphic = plot(x**2-3, xmin=0, xmax=4, ymin=-3, ymax=13) graphic += plot(line([(0, 0), (0, -3)]), color='red', linestyle=--) graphic += plot(line([(4, 0), (4, 13)]), color='red',

Re: [sage-support] Problem with color and plot

2014-09-28 Thread Vincent Delecroix
Hello, The return value of the function line is a plot object. It is to that function that you need to specify your color... for example sage: graphics = plot(x^2, (x,0,2)) sage: graphics += line2d([(0,0),(3,4)], color='red') sage: graphics.show() Vincent 2014-09-28 12:43 UTC+02:00, Christophe

Re: [sage-support] Problem with color and plot

2014-09-28 Thread Christophe Bal
Thanks for this ! 2014-09-28 12:51 GMT+02:00 Vincent Delecroix 20100.delecr...@gmail.com: Hello, The return value of the function line is a plot object. It is to that function that you need to specify your color... for example sage: graphics = plot(x^2, (x,0,2)) sage: graphics +=

[sage-support] how save the terminal and not close it and let it continue to run in gap system after sign out

2014-09-28 Thread Martin Chan
in sage cloud how save the terminal and not close it and let it continue to run in gap system after sign out? how to terminate the terminal if it hangs after running a command for above question? -- You received this message because you are subscribed to the Google Groups sage-support

Re: [sage-support] how to get a list of terms of expression such as x+z^2 in gap system

2014-09-28 Thread Martin Chan
thank you. actually i mean in gap system i solved with poly1 := 0; for j in [1..Length(prepoly1[1])] do zz:=1; for i in SplitString(String(prepoly1[1][j]), + ) do zz:=zz*EvalString(i); od; if zz 1 then poly1 := poly1 + zz; fi; od; vdelecroix於 2014年9月28日星期日UTC+8下午5時24分34秒寫道:

[sage-support] Re: how save the terminal and not close it and let it continue to run in gap system after sign out

2014-09-28 Thread Dima Pasechnik
On 2014-09-28, Martin Chan martinchan2...@gmail.com wrote: in sage cloud how save the terminal and not close it and let it continue to run in gap system after sign out? check out the Unix command 'screen'. It basically creates a terminal session that you leave running and lets you log out,

[sage-support] Re: how save the terminal and not close it and let it continue to run in gap system after sign out

2014-09-28 Thread Dima Pasechnik
On 2014-09-28, Dima Pasechnik dimp...@gmail.com wrote: On 2014-09-28, Martin Chan martinchan2...@gmail.com wrote: in sage cloud oops, sorry, I missed this. Sage cloud has a time limit for processes, so what I wrote won't help, unless you request an extension of these limits for a particular

Re: [sage-support] Problem with color and plot

2014-09-28 Thread William A Stein
On Sun, Sep 28, 2014 at 3:43 AM, Christophe Bal projet...@gmail.com wrote: Hello. What am I doing wrong in the following code that display everything in blue ? Christophe -- graphic = plot(x**2-3, xmin=0, xmax=4, ymin=-3, ymax=13) graphic += plot(line([(0, 0), (0, -3)]),

Re: [sage-support] Problem with color and plot

2014-09-28 Thread Christophe Bal
Yes you're right but indeed I was thinking like a matplotlib. Le 28 sept. 2014 19:34, William A Stein wst...@uw.edu a écrit : On Sun, Sep 28, 2014 at 3:43 AM, Christophe Bal projet...@gmail.com wrote: Hello. What am I doing wrong in the following code that display everything in blue ?