In the example below you can see an illustration of the problem I have. I would like to draw an error from node s to 6, but I want to clear node 1. It is easy to do using \draw
as you can see from the red dotted line. However, I would much rather find the correct option and have it included in the \path
command. Grateful for any help.
\documentclass[border=10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
automata,
intersections,
positioning,
quotes,
matrix
}
\usetikzlibrary{shapes,arrows,fit}
\begin{document}
\begin{tikzpicture}[auto, node distance = 30mm and 40mm,
dot/.style = {circle, fill=red, inner sep=2pt, node contents={}},
every state/.style = {circle, draw=red, very thick},
every edge/.style = {draw=blue, line width=1pt, -Stealth,
shorten >=2pt, shorten <=2pt,
},
every edge quotes/.style = {auto, sloped, inner sep=2pt},
every label/.style = {rectangle, inner sep=2pt, font=\large},
mincut/.style = {draw=green!40!black, line width=3pt, dashed}
]
\node[state] at (0, 0) (1) [label=left:{ $ $}] {$1$};
\node[state] (4) [right= of 1, label=right:{ $ $}] {4};
\node[state] (2) [above= of 4, label=above:{ $ $}] {2};
\node[state] (6) [below right=2 and 1.7 of 4, label=below:{ $ $}] {6};
\node[state] (s) [above= of 1, label=above:{ $ $}] {s};
\path (s) edge["{$5,0$}"] (1)
edge["{$1,0$}"] (2)
edge["{$2,0$} ",out=180,in=200] (6)
(1) edge["{$2,2$}"] (2)
edge["{$3,1$}"] (4)
edge["{$2,2$}"] (6);
\draw[red,->,very thick,dashed] (s) .. controls (-3,-2) .. (6);
\end{tikzpicture}
\end{document}
\path
as opposed to\draw
but I don't know why. Can you explain?