I use tikZ to draw graphs. In the picture below, I'd like to indicate that the vertices
v_1
, v_2
and v
have neighbours that are not shown in the picture. I was thinking about a little cone or something similar, but I've no idea how to implement that.
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{figure}[!ht]
\centering
\tikzstyle{vertex}=[circle,draw, minimum size=12pt,inner sep=0pt]
\tikzstyle{edge}=[draw,-]
\tikzstyle{weight}=[font=\small]
\begin{tikzpicture}
\foreach \pos/\name in {{(1,3)/v_1}, {(1,2)/v}, {(2,2)/w_2},{(0,2)/w_1},{(1,1)/v_2}, {(2,3)/v_3}}
\node[vertex] (\name) at \pos {$\name$};
\foreach \source/ \dest /\weight in {v_1/v/5, v_1/w_1/3,v_1/w_2/3,v/w_1/2, v/w_2/2, v_2/v/5 , v_2/w_1/3 , v_2/w_2/3, v/v_3/1 }
\path[edge] (\source) -- node[weight] {} (\dest);
\foreach \vertex in {}
\path node[selected vertex] at (\vertex) {$\vertex$};
\end{tikzpicture}
\end{figure}
\end{document}
Thanks in advance
Richard