ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 13 Mar 2012 09:45:34 -0500plotting in a script filehttps://ask.sagemath.org/question/8787/plotting-in-a-script-file/I have install sage in my computer and i have started testing sage examples. I dont understand sth. for example
sage: v = [(1,10),(2,20)]
sage: line(v)
it runs in shell and I can look plot screen.
I try below codes
sage: load "test.sage"
or
But instead of Interactive Shell, when I try to run the file "test.sage",
on terminal :
$ sage test.sage
it isnt right.
Mon, 12 Mar 2012 12:52:44 -0500https://ask.sagemath.org/question/8787/plotting-in-a-script-file/Answer by Shashank for <p>I have install sage in my computer and i have started testing sage examples. I dont understand sth. for example</p>
<pre><code>sage: v = [(1,10),(2,20)]
sage: line(v)
</code></pre>
<p>it runs in shell and I can look plot screen.
I try below codes</p>
<pre><code>sage: load "test.sage"
</code></pre>
<p>or</p>
<p>But instead of Interactive Shell, when I try to run the file "test.sage",
on terminal :</p>
<pre><code>$ sage test.sage
</code></pre>
<p>it isnt right.</p>
https://ask.sagemath.org/question/8787/plotting-in-a-script-file/?answer=13357#post-id-13357If you have the following content in test.sage
v = [(1,10),(2,20)]
p1=line(v)
p1.show()
and you run the command
$sage test.sage
Then it works. Notice the additional line involving 'show'.Mon, 12 Mar 2012 13:03:11 -0500https://ask.sagemath.org/question/8787/plotting-in-a-script-file/?answer=13357#post-id-13357Comment by bhdrymn for <p>If you have the following content in test.sage</p>
<pre><code>v = [(1,10),(2,20)]
p1=line(v)
p1.show()
</code></pre>
<p>and you run the command</p>
<pre><code>$sage test.sage
</code></pre>
<p>Then it works. Notice the additional line involving 'show'.</p>
https://ask.sagemath.org/question/8787/plotting-in-a-script-file/?comment=20135#post-id-20135thanks for answer, this is running but I want to look graph in screen as permant. scrip runs, later tmp_0.png can be shown and closed immediately. I use fedora 14. Tue, 13 Mar 2012 09:45:34 -0500https://ask.sagemath.org/question/8787/plotting-in-a-script-file/?comment=20135#post-id-20135