2

How I can put customize self loop on any node?

\documentclass[legalpaper,landscape]{article}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[paperheight=22cm,paperwidth=22cm,bottom=0.5cm,top=0.5cm,left=0cm,right=0cm]{geometry}

\usepackage[upright]{fourier}
\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\thispagestyle{empty}

\begin{document}
\SetVertexNormal[Shape  = circle,
             FillColor  = black,
             LineWidth  = 2pt,
             InnerSep   =  0pt]
\SetUpEdge[lw     = 3pt,
       color      = black,
       labelcolor = white]

\begin{center}
\begin{tikzpicture}{\SetGraphUnit{5}
\Vertices[x=0,y=0]{line}{1,2,3,4,5}}
\Vertex[x=10,y=10]{6}
\Vertex[x=10,y=5]{7}
\Vertex[x=10,y=-10]{8}
\Vertex[x=10,y=-5]{9}
\Vertex[x=5,y=3]{10}
\Vertex[x=5,y=-3]{11}
\Vertex[x=15,y=3]{12}
\Vertex[x=15,y=-3]{13}
\Vertex[x=7.5,y=5]{14}
\Vertex[x=7.5,y=-5]{15}
\Vertex[x=12.5,y=5]{16}
\Vertex[x=12.5,y=-5]{17}
\Edges(1,10,3,12,5,13,3,11,1,2,3,4,5)
\Edges(3,14,6,16,3,17,8,15,3)
\Edges(6,7,3,9,8)
\end{tikzpicture}
\end{center}

\end{document}  
1

There's \Loop:

\documentclass[border=3pt]{standalone}
\usepackage[upright]{fourier}
\usepackage{tkz-graph}
\usetikzlibrary{arrows}

\begin{document}
\SetVertexNormal[Shape  = circle,
             FillColor  = black,
             LineWidth  = 2pt,
             InnerSep   =  0pt]
\SetUpEdge[lw     = 3pt,
       color      = black,
       labelcolor = white]

\begin{tikzpicture}{\SetGraphUnit{5}
\Vertices[x=0,y=0]{line}{1,2,3,4,5}}
\Vertex[x=10,y=10]{6}
\Vertex[x=10,y=5]{7}
\Vertex[x=10,y=-10]{8}
\Vertex[x=10,y=-5]{9}
\Vertex[x=5,y=3]{10}
\Vertex[x=5,y=-3]{11}
\Vertex[x=15,y=3]{12}
\Vertex[x=15,y=-3]{13}
\Vertex[x=7.5,y=5]{14}
\Vertex[x=7.5,y=-5]{15}
\Vertex[x=12.5,y=5]{16}
\Vertex[x=12.5,y=-5]{17}
\Edges(1,10,3,12,5,13,3,11,1,2,3,4,5)
\Edges(3,14,6,16,3,17,8,15,3)
\Edges(6,7,3,9,8)
\Loop[dist=2cm,dir=WE,style={ultra thick,->}](1)
\Loop[dist=3cm,dir=EA,style={line width=4pt,blue,->}](6)
\end{tikzpicture}

\end{document}

enter image description here

  • What is the meaning of WE and EA? – kalpeshmpopat Jul 11 '15 at 6:26
  • Can we rotate the loop also? – kalpeshmpopat Jul 11 '15 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.