Display Vertex Label a Polytope

asked 2019-02-24 11:46:58 +0200

ricom gravatar image

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)])
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!

edit retag flag offensive close merge delete

Comments

You may read http://doc.sagemath.org/html/en/thema... and see if it fits your needs.

FrédéricC gravatar imageFrédéricC ( 2019-02-24 20:33:35 +0200 )edit