ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 10 Jan 2019 12:49:53 -0600Error in drawing the complement of CompleteBipartite Graphhttp://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 09:02:43 -0600http://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>
http://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 12:49:53 -0600http://ask.sagemath.org/question/44972/error-in-drawing-the-complement-of-completebipartite-graph/?answer=44990#post-id-44990