-1

I'm trying to draw an arrow connecting two elements like this:

enter image description here

Even when I use -| command.

\draw [arrow, very thick] (a1) -- (a2);
\draw [arrow] (a2) -- (a3);
\draw [arrow] (a3) -- (a4);
\draw [arrow] (a4) -- (a5);
\draw [arrow] (a5) -- (a6);
\draw [arrow] (a6) -| node[anchor=west]  {No} (a2);
\draw [arrow] (a6) -- node[anchor=west]  {Yes} (a7);
\draw [arrow] (a7) -- (a8);

When i compile this code this is what i get an arrow that goes straight from 2nd decision to ACT2 : enter image description here

1 Answers1

0

I used this method: https://tex.stackexchange.com/a/102390/308613 declaring a line style in tikzset like this:

line/.style={draw, -latex}

then creating a \path in tikzpicture body.

\node (s1) [process, yshift=-0.5cm] {ACT 1}; 
\node (s2) [process, below of=s1] {ACT 2};
\node (d1) [decision, below of=s2, yshift=-1.5cm] {DECISION 1}; 
\node (s3) [process, below of=d1,  yshift=-1.5cm] {ACT 3};

\path [line] (s1) -- (s2); \path [line] (s2) -- (d1); \path [line] (d1) -- (s3);

\path [line] (d1.east) -- ([xshift=0.6cm]s2.east) -- ([xshift=0.5cm]s1.east) -- (s1.east);

The final result:

enter image description here

  • 2
    This answer is not very helpful Pleas add MWE (Minimal Working Example), which show how you solve your problem. You can also accept your answer ... – Zarko Nov 23 '23 at 15:29
  • 1
    Please clarify your question via Edit. In this place questions are problems, whiel each answer is a solution. This is different to chatting forums. Stange as it feels in the beginning, it's very useful. // Please delete this "answer" (non-solution) after Editing. // We also liek your code and dislike following links ... – MS-SPO Nov 23 '23 at 15:41
  • @MS-SPO It looks like an answer to me. Why don't you think this is a solution? – cfr Nov 24 '23 at 18:54
  • @cfr, it looks puzzling to me. Most important: probably nobody else can use the code posted, as many things are missing. So, if it's in doubt, whether it's an answer or an explanation of the initial question ... it's not good enough in my view. However, the OP is a beginner here, so there will be some hickups for now, which is ok. – MS-SPO Nov 24 '23 at 18:57
  • @MS-SPO I agree it needs the code to be filled out, but it is clearly intended as an answer and not as clarification of the question. I honestly don't see how there can be any doubt about that. It demonstrates a technique which changes the route the arrow takes to avoid the problem in the question. – cfr Nov 24 '23 at 19:13
  • @cfr, ok, just to conclude, what would have helped me is a simple phrase like "My solution ...", "I found this approach ..." or similar. – MS-SPO Nov 24 '23 at 19:16
  • Guys, what should I add to make my question and my answer valid? – Adam Dango Nov 25 '23 at 00:23