I have no background in drawing in LaTeX and I just came across the tkz-berge
package. I want to draw a complete graph, a small-world graph and a random connected graph.
The complete graph was easy
\begin{tikzpicture}
\begin{scope}[xshift=12cm]
\grComplete[RA=2/sin(60)]{10}
\end{scope}
\draw (12,-3) node {A Complete Graph};
\end{tikzpicture}
The small world graph is basically a circle with a few edges added to it that 'cross' the circle. Hence, I started out with
\begin{tikzpicture}
\begin{scope}[xshift=12cm]
\grCycle[prefix=a,RA=2/sin(60)]{10}
\end{scope}
\draw (12,-3) node {A Small World Graph};
\end{tikzpicture}
But how do I add edges to this graph manually, i.e. how do I refer to nodes that have been automatically generated and ask the package to draw an edge between them.
In order to get a random graph with the same number of nodes and the same placement of nodes as the other two I started out with
\begin{tikzpicture}
\begin{scope}[xshift=12cm]
\grEmptyCycle[prefix=a,RA=2/sin(60)]{10}
\end{scope}
\draw (12,-3) node {A Random Graph};
\end{tikzpicture}
This worked out well, but now I have the same problem as before, I want to manually add edges to the nodes already drawn. Note that it is not important to me that the edges are randomly generated by LaTeX, I can happily just add edges manually so that it looks like a random graph.
\Edges(a1,a5,a9)
? The names are shown inside the nodes.