Ask Your Question

How can I display a polytope in SageMathCloud?

asked 2014-07-23 08:22:32 -0500

smbelcas gravatar image

updated 2015-01-17 10:51:30 -0500

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 10:14:52 -0500 )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 10:18:50 -0500 )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 13:18:45 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-07-23 15:13:02 -0500

updated 2014-07-23 15:36:35 -0500

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 15:37:31 -0500 )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-23 19:44:31 -0500 )edit
William Stein gravatar imageWilliam Stein ( 2014-07-24 08:03:42 -0500 )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 08:04:57 -0500 )edit
slelievre gravatar imageslelievre ( 2014-07-24 09:08:27 -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

1 follower


Asked: 2014-07-23 08:22:32 -0500

Seen: 263 times

Last updated: Jul 24 '14