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.Sun, 24 Feb 2019 20:33:35 +0100Display Vertex Label a Polytopehttps://ask.sagemath.org/question/45538/display-vertex-label-a-polytope/I want to display a polytope with labels of vertices. I guess I can do this by using the argument `vertex_labels = True` in the function `show()`. However, how can I input the labels of the vertices? More concretely, what should I include/change in the code below so that I can display, for example, A at (1,0), B at (0,1) and C at (1,1)?
P = Polyhedron(vertices = [(1,0), (0,1), (1,1)]) <br>
P.show(vertex_labels = True)
Additionally, I think the labels when shown will be on top of the vertices. How can I display the labels besides the vertices and hopefully outside of the polytope?
Thanks!Sun, 24 Feb 2019 11:46:58 +0100https://ask.sagemath.org/question/45538/display-vertex-label-a-polytope/Comment by FrédéricC for <p>I want to display a polytope with labels of vertices. I guess I can do this by using the argument <code>vertex_labels = True</code> in the function <code>show()</code>. However, how can I input the labels of the vertices? More concretely, what should I include/change in the code below so that I can display, for example, A at (1,0), B at (0,1) and C at (1,1)?</p>
<p>P = Polyhedron(vertices = [(1,0), (0,1), (1,1)]) <br>
P.show(vertex_labels = True)</p>
<p>Additionally, I think the labels when shown will be on top of the vertices. How can I display the labels besides the vertices and hopefully outside of the polytope?</p>
<p>Thanks!</p>
https://ask.sagemath.org/question/45538/display-vertex-label-a-polytope/?comment=45539#post-id-45539You may read http://doc.sagemath.org/html/en/thematic_tutorials/geometry/polytope_tikz.html and see if it fits your needs.Sun, 24 Feb 2019 20:33:35 +0100https://ask.sagemath.org/question/45538/display-vertex-label-a-polytope/?comment=45539#post-id-45539