A graph is circle graph if its vertices can be represented as chords of a circle such that two chords interesct if and only if corresponding vertices form an edge in the graph. As an example of an external link, see the Wikipedia article on circle graphs. Which is where the tikz code below was lifted from.
This is a minor rearrangement of the code for the graphics mentioned in the Wikipedia article. The effect is to place the two figures side-by-side in a centered table. The “scale” has been reduced to 2 from an original value of 4.
The Heawood graph below was created in Sage, then its latex form was requested, and the output was cut/paste into the source of this document for processing by the tikz-graph package. It is the unique distance-regular graph \Gamma with intersection array \left \{3,2,2;1,1,3\right \}. It has 14 vertices and spectrum {3}^{1}\,{(\sqrt{2})}^{6}\,{(2)}^{6}\,{(3)}^{1}. See Andries E. Brouwer’s Heawood Graph Page for more information.
If you would prefer to see Sage’s version of this graph, execute the following code block in the worksheet version of this document.
{{{id=1| G = graphs.HeawoodGraph() show(G) /// }}}In the Sage worksheet version of this document, you can rerun the code used to create the latex souce of the tkz-graph version of this graph.
{{{id=3| G = graphs.HeawoodGraph() latex(G) /// }}}
Sage includes a editor that allows you to construct graphs with a point-and-click interface. The graph below was built this way, then converted to latex and finally pasted into the latex source of this document.
In the worksheet version of this document, you can experiment with the graph editor. Construct a graph by clicking to create new vertices. Then click one vertex to highlight it (it will become red) and then click a second vertex to form an edge from the highlighted vertex to the second vertex. Use the same process to remove an edge. Vertices can be deleted by dragging them outside the editing window and dropping them there.
When you have the editor window available, use the“variable name” input field to name the graph H.
{{{id=5| graph_editor() /// }}}After saving the graph you can manipulate it with the full range of Sage commands by referencing the graph as H. For example the commands below will give you basic information about the graph.
{{{id=7| print "Number of vertices: ", H.num_verts() print "Number of edges: ", H.num_edges() print "Is connected: ", H.is_connected() /// }}}