Ask Your Question

How can I display a polytope in SageMathCloud?

asked 2014-07-23 15:22:32 +0200

smbelcas gravatar image

updated 2015-01-17 17:51:30 +0200

FrédéricC gravatar image

So... I have students who cannot install sage locally. Thus they use sagecloud instead. However, graphics don't show up there. Instead, some wack text string that semi-mimics the command given shows up. What's up with this? I have no idea what to tell the students...

edit retag flag offensive close merge delete


If you can give more specific details of a command that doesn't work, and what part of sagemathcloud they are using, that would be helpful - as you know, I don't use it myself.

kcrisman gravatar imagekcrisman ( 2014-07-23 17:14:52 +0200 )edit

If you explain how to reproduce the error that is frustrating you, there are better chances that someone will try to provide help. For instance: """ Here is what I do: connect to, [open a new Sage worksheet] or [open a new IPython notebook] or [open a new terminal], etc, then type [some command]. I would expect to see the graphic show up. Instead, I see the following: [paste the output you get]. """

slelievre gravatar imageslelievre ( 2014-07-23 17:18:50 +0200 )edit

So, I have never used sagecloud myself. What happens is students make accounts on and then they open a Sage worksheet I sent them. They issue the commands P1 = Polyhedron(vertices = [[-5,2], [4,4], [3,0], [1,0], [2,-4], [-3,-1], [-5,-3]]) and show(P1) and they get some wack text string.

smbelcas gravatar imagesmbelcas ( 2014-07-23 20:18:45 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-07-23 22:13:02 +0200

slelievre gravatar image

updated 2014-07-23 22:36:35 +0200

Quick solution: instead of show(P1), do

Comment: This looks like a bug to me. For anyone interested: while on my computer, show(P1) has the same effect as, on SageMathCloud, it seems to "pretty-print" the string for latex(P1). Compare:

sage: latex(P1)
\text{\texttt{A{ }2{-}dimensional{ }polyhedron{ }in{ }ZZ{\char`\^}2{ }defined{ }as{ }the{ }convex{ }hull{ }of{ }4{ }vertices}}
edit flag offensive delete link more


@smbelcas: can you confirm that the text string that you see is something like the output of `latex(P1)` shown here?

slelievre gravatar imageslelievre ( 2014-07-23 22:37:31 +0200 )edit

Yes. That is in fact exactly what shows up. Thank you! Now I have 4 students for whom polytopes are possible.

smbelcas gravatar imagesmbelcas ( 2014-07-24 02:44:31 +0200 )edit
William Stein gravatar imageWilliam Stein ( 2014-07-24 15:03:42 +0200 )edit

Can somebody change the title/description of this question? It's really bad. I can't figure out how to change it.

William Stein gravatar imageWilliam Stein ( 2014-07-24 15:04:57 +0200 )edit
slelievre gravatar imageslelievre ( 2014-07-24 16:08:27 +0200 )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

1 follower


Asked: 2014-07-23 15:22:32 +0200

Seen: 475 times

Last updated: Jul 24 '14