First time here? Check out the FAQ!

Ask Your Question
0

How can I display a polytope in SageMathCloud?

asked 10 years ago

smbelcas gravatar image

updated 10 years ago

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

Preview: (hide)

Comments

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 ( 10 years ago )

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 cloud.sagemath.org, [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 ( 10 years ago )

So, I have never used sagecloud myself. What happens is students make accounts on https://cloud.sagemath.com/ 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 ( 10 years ago )

1 Answer

Sort by » oldest newest most voted
2

answered 10 years ago

slelievre gravatar image

updated 10 years ago

Quick solution: instead of show(P1), do P1.show().

Comment: This looks like a bug to me. For anyone interested: while on my computer, show(P1) has the same effect as P1.show(), 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}}
Preview: (hide)
link

Comments

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

slelievre gravatar imageslelievre ( 10 years ago )

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

smbelcas gravatar imagesmbelcas ( 10 years ago )

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 ( 10 years ago )
slelievre gravatar imageslelievre ( 10 years ago )

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: 10 years ago

Seen: 623 times

Last updated: Jul 24 '14