Ask Your Question
0

plotting in a script file

asked 2012-03-12 12:52:44 -0500

anonymous user

Anonymous

updated 2012-03-12 13:01:40 -0500

Shashank gravatar image

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-03-12 13:03:11 -0500

Shashank gravatar image

updated 2012-03-12 18:25:01 -0500

If 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'.

edit flag offensive delete link more

Comments

thanks 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.

bhdrymn gravatar imagebhdrymn ( 2012-03-13 09:45:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-03-12 12:52:44 -0500

Seen: 339 times

Last updated: Mar 12 '12