I'm a beginner of latex and tikz. I want to have curved arrows on top of each node as in tikx example.
Following is my code.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
[scale=.8,auto=left,every node/.style={circle,fill=blue!20}]
\node (n1) at (9,8) {1};
\node (n2) at (6,7) {2};
\node (n3) at (5,5) {3};
\node (n4) at (6,3) {4};
\node (n5) at (9,2) {5};
\node (n6) at (12,3) {6};
\node (n7) at (13,5) {7};
\node (n8) at (12,7) {8};
\foreach \from/\to in {n1/n2,n2/n3,n3/n4,n4/n5,n5/n6,n6/n7,n7/n8,n8/n1,n1/n3,n1/n4,n1/n5,n1/n6,n1/n7,n2/n4,n2/n5,n2/n6,n2/n7,n2/n8,n3/n5,n3/n6,n3/n7,n3/n8,n4/n6,n4/n7,n4/n8,n5/n7,n5/n8,n6/n8}
\draw (\from) -- (\to);
\end{tikzpicture}
\end{figure}
\end{document}
How to draw curved arrows on top of every node?
Aucun commentaire:
Enregistrer un commentaire