Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Drawing a planar multigraph with loops

I would like to draw a planar graph with multiple edges and loops in Sage. Unfortunately, the default algorithm draws may intersecting edges and Sage is unable to compute an embedding for graphs with loops multiple edges.

Fortunately I know a planar embedding of this graph, so I tried using the set_embedding method, but it doesn't seem to work, either. If I only list a vertice's the neighbours, omitting their multiplicities, Sage complains that the list is shorter than the vertice's degree, while if I include multiple copies of each neighbour according to multiplicity, then Sage complains that elements of the list aren't unique.

Is there a way to achieve what I need?