Ask Your Question
1

Can't get plotting to work

asked 2014-09-26 04:48:53 +0100

RickHorowitz gravatar image

updated 2014-09-26 09:48:34 +0100

tmonteil gravatar image

Downloaded sage-6.3-x86_64-Linux-Ubuntu_10.04_x86_64.tar.gz, expanded the archive file onto my Linux Mint 15 system.

I ran sage simply by typing: ./sage from the command line.

I then type the command: notebook() at the sage prompt to try out some simple plotting features. I get the following output from the command:

The notebook files are stored in: sage_notebook.sagenb
┌────────────────────────────────────────────────┐
│                                                │
│ Open your web browser to http://localhost:8080 │
│                                                │
└────────────────────────────────────────────────┘

Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac"
/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
  _warn("Not using mpz_powm_sec.  You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
2014-09-25 22:32:31-0400 [-] Log opened.
2014-09-25 22:32:31-0400 [-] twistd 13.2.0 (/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/bin/python 2.7.8) starting up.
2014-09-25 22:32:31-0400 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2014-09-25 22:32:31-0400 [-] QuietSite starting on 8080
2014-09-25 22:32:31-0400 [-] Starting factory <__builtin__.QuietSite instance at 0x7f19fc981fc8>

The browser window opens up, pointed to http://localhost:8080/home/admin/2/. I then created a worksheet and entered the following command:

circle((0,0), 1, rgbcolor=(1,1,0))

This results in the following traceback, and I cannot get any of the simple plots in the tutorial to display anything. Thanks for any help...

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_2.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Y2lyY2xlKCgwLDApLCAxLCByZ2Jjb2xvcj0oMSwxLDApKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmpJWsQ0O/___code___.py", line 3, in <module>
    exec compile(u'circle((_sage_const_0 ,_sage_const_0 ), _sage_const_1 , rgbcolor=(_sage_const_1 ,_sage_const_1 ,_sage_const_0 ))
  File "", line 1, in <module>

  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/displayhook.py", line 459, in __call__
    if self.try_format_graphics(obj):
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/displayhook.py", line 417, in try_format_graphics
    return obj._graphics_()
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 824, in _graphics_
    self.show()
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 471, in wrapper
    return func(*args, **kwds)
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 1818, in show
    self.save(filename, **kwds)
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 471, in wrapper
    return func(*args, **kwds)
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/sage/plot/graphics.py", line 2895, in save
    from matplotlib import rcParams
  File "/home/rick/install.dsk/Sage/sage-6.3-x86_64-Linux/local/lib/python2.7/site-packages/matplotlib-1 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2014-09-26 09:54:59 +0100

tmonteil gravatar image

It seems you should install libgfortran3 package, e.g. by typing:

sudo apt-get install libgfortran3

Please tell us if it works, this is related to trac ticket 8049.

Otherwise you will probably have to compile Sage from source.

edit flag offensive delete link more

Comments

Success! Thank you very much for the quick response. I agree with the comments in the ticket that libgfortran3 should be included in the binary. I expect this was an oversight due to the developer having libgfortran3 already installed. Anyway...thanks!

RickHorowitz gravatar imageRickHorowitz ( 2014-09-27 04:16:36 +0100 )edit
slelievre gravatar imageslelievre ( 2020-04-19 00:54:36 +0100 )edit
0

answered 2014-09-26 12:51:04 +0100

nerak99 gravatar image

That command does not appear to call plot anyway.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-26 04:48:53 +0100

Seen: 443 times

Last updated: Sep 26 '14