Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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