I am trying model a network and is new to tikz. Please let me know how to can I draw node with some outgoing edges to somewhere as given in the image below.
Any help is appreciated.
You can define the coordinates, in absolute or relative terms, from/to where the arrows should go. Moreover, you can define coordinates in the same way as nodes, by using \coordinate
instead of \node
, and use their names in \draw
commands. One solution:
\documentclass[tikz,border=1pt]{standalone}
\begin{document}
\begin{tikzpicture}[auto,scale=2]\scriptsize
\node[circle,draw] (N) {N};
\draw[<-] (N) -- node[swap,sloped] {$\mathrm{in}_1$} +(150:1);
\draw[<-] (N) -- node[swap] {$\mathrm{in}_2$} +(180:1);
\draw[<-] (N) -- node[sloped] {$\mathrm{in}_3$} +(210:1);
\draw[->] (N) -- node[sloped] {$\mathrm{out}_1$} +( 30:1);
\draw[->] (N) -- node[sloped,pos=0.8] {$\mathrm{out}_2$} +( 10:1);
\draw[->] (N) -- node[sloped,pos=0.8,swap] {$\mathrm{out}_3$} +(-10:1);
\draw[->] (N) -- node[sloped,swap] {$\mathrm{out}_3$} +(-30:1);
\end{tikzpicture}
\end{document}
\draw[<-]