ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 24 Jul 2014 16:08:27 +0200How can I display a polytope in SageMathCloud?https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/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...Wed, 23 Jul 2014 15:22:32 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/Comment by kcrisman for <p>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...</p>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23551#post-id-23551If 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.Wed, 23 Jul 2014 17:14:52 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23551#post-id-23551Comment by smbelcas for <p>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...</p>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23554#post-id-23554So, 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.Wed, 23 Jul 2014 20:18:45 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23554#post-id-23554Comment by slelievre for <p>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...</p>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23552#post-id-23552If 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]. """Wed, 23 Jul 2014 17:18:50 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23552#post-id-23552Answer by slelievre for <p>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...</p>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?answer=23557#post-id-23557**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}}
Wed, 23 Jul 2014 22:13:02 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?answer=23557#post-id-23557Comment by slelievre for <p><strong>Quick solution</strong>: instead of <code>show(P1)</code>, do <code>P1.show()</code>. </p>
<p><strong>Comment</strong>:
This looks like a bug to me. For anyone interested: while on my computer, <code>show(P1)</code> has the same effect as <code>P1.show()</code>, on SageMathCloud, it seems to "pretty-print" the string for <code>latex(P1)</code>. Compare:</p>
<pre><code>sage: latex(P1)
\text{\texttt{A{ }2{-}dimensional{ }polyhedron{ }in{ }ZZ{\char`\^}2{ }defined{ }as{ }the{ }convex{ }hull{ }of{ }4{ }vertices}}
</code></pre>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23558#post-id-23558@smbelcas: can you confirm that the text string that you see is something like the output of `latex(P1)` shown here?Wed, 23 Jul 2014 22:37:31 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23558#post-id-23558Comment by smbelcas for <p><strong>Quick solution</strong>: instead of <code>show(P1)</code>, do <code>P1.show()</code>. </p>
<p><strong>Comment</strong>:
This looks like a bug to me. For anyone interested: while on my computer, <code>show(P1)</code> has the same effect as <code>P1.show()</code>, on SageMathCloud, it seems to "pretty-print" the string for <code>latex(P1)</code>. Compare:</p>
<pre><code>sage: latex(P1)
\text{\texttt{A{ }2{-}dimensional{ }polyhedron{ }in{ }ZZ{\char`\^}2{ }defined{ }as{ }the{ }convex{ }hull{ }of{ }4{ }vertices}}
</code></pre>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23559#post-id-23559Yes. That is in fact exactly what shows up. Thank you! Now I have 4 students for whom polytopes are possible.Thu, 24 Jul 2014 02:44:31 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23559#post-id-23559Comment by William Stein for <p><strong>Quick solution</strong>: instead of <code>show(P1)</code>, do <code>P1.show()</code>. </p>
<p><strong>Comment</strong>:
This looks like a bug to me. For anyone interested: while on my computer, <code>show(P1)</code> has the same effect as <code>P1.show()</code>, on SageMathCloud, it seems to "pretty-print" the string for <code>latex(P1)</code>. Compare:</p>
<pre><code>sage: latex(P1)
\text{\texttt{A{ }2{-}dimensional{ }polyhedron{ }in{ }ZZ{\char`\^}2{ }defined{ }as{ }the{ }convex{ }hull{ }of{ }4{ }vertices}}
</code></pre>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23565#post-id-23565This is now https://github.com/sagemath/cloud/issues/153 .Thu, 24 Jul 2014 15:03:42 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23565#post-id-23565Comment by slelievre for <p><strong>Quick solution</strong>: instead of <code>show(P1)</code>, do <code>P1.show()</code>. </p>
<p><strong>Comment</strong>:
This looks like a bug to me. For anyone interested: while on my computer, <code>show(P1)</code> has the same effect as <code>P1.show()</code>, on SageMathCloud, it seems to "pretty-print" the string for <code>latex(P1)</code>. Compare:</p>
<pre><code>sage: latex(P1)
\text{\texttt{A{ }2{-}dimensional{ }polyhedron{ }in{ }ZZ{\char`\^}2{ }defined{ }as{ }the{ }convex{ }hull{ }of{ }4{ }vertices}}
</code></pre>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23570#post-id-23570@William Stein: done.Thu, 24 Jul 2014 16:08:27 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23570#post-id-23570Comment by William Stein for <p><strong>Quick solution</strong>: instead of <code>show(P1)</code>, do <code>P1.show()</code>. </p>
<p><strong>Comment</strong>:
This looks like a bug to me. For anyone interested: while on my computer, <code>show(P1)</code> has the same effect as <code>P1.show()</code>, on SageMathCloud, it seems to "pretty-print" the string for <code>latex(P1)</code>. Compare:</p>
<pre><code>sage: latex(P1)
\text{\texttt{A{ }2{-}dimensional{ }polyhedron{ }in{ }ZZ{\char`\^}2{ }defined{ }as{ }the{ }convex{ }hull{ }of{ }4{ }vertices}}
</code></pre>
https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23566#post-id-23566Can somebody change the title/description of this question? It's really bad. I can't figure out how to change it.Thu, 24 Jul 2014 15:04:57 +0200https://ask.sagemath.org/question/23544/how-can-i-display-a-polytope-in-sagemathcloud/?comment=23566#post-id-23566