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, 10 Jan 2019 19:49:53 +0100Error in drawing the complement of CompleteBipartite Graphhttps://ask.sagemath.org/question/44972/error-in-drawing-the-complement-of-completebipartite-graph/The following code generates the wrong Graph
**graphs.CompleteBipartiteGraph(5,6).complement()**
Can anyone help to correct it pleaseWed, 09 Jan 2019 16:02:43 +0100https://ask.sagemath.org/question/44972/error-in-drawing-the-complement-of-completebipartite-graph/Answer by slelievre for <p>The following code generates the wrong Graph
<strong>graphs.CompleteBipartiteGraph(5,6).complement()</strong>
Can anyone help to correct it please</p>
https://ask.sagemath.org/question/44972/error-in-drawing-the-complement-of-completebipartite-graph/?answer=44990#post-id-44990The first comment of
- [Sage Trac ticket 15669](https://trac.sagemath.org/ticket/15669)
explains that the complement graph looks wrong only because it is
plotted with the same layout as the original graph, so its edges
are all horizontal, drawn on top of each other, making the drawing
misleading (it looks as though many edges are missing).
To see the structure of the complement better, change the layout:
sage: G = graphs.CompleteBipartiteGraph(5, 6)
sage: G.show()
sage: Gc = G.complement()
sage: Gc.show(layout='spring')
Thu, 10 Jan 2019 19:49:53 +0100https://ask.sagemath.org/question/44972/error-in-drawing-the-complement-of-completebipartite-graph/?answer=44990#post-id-44990