0

I want to make my flow chart looks better with positionning the arrow that goes from my decision node (Terminer?) to the third node (Evalution).

Thank you!

enter image description here

Here is my code:

\begin{figure}[H]
    \centering
    \begin{tikzpicture}[node distance=2cm]
        \node (start) [startstop] {Démarrer};
        \node (pro1) [process, below of=start] {Population initiale};
        \node (pro2) [process, below of=pro1] {Evaluation};
        \node (pro3) [process, below of=pro2] {Fitness et sélection};
        \node (pro4) [process, below of=pro3] {Croisement};
        \node (pro5) [process, below of=pro4] {Mutation};
        \node (pro6) [process, below of=pro5] {Nouvelle génération};
        \node (dec1) [decision, below of=pro6] {Terminer?};
        \node (end) [startstop, below of=dec1] {Résultats};
        \draw [arrow] (start) -- (pro1);
        \draw [arrow] (pro1) -- (pro2);
        \draw [arrow] (pro2) -- (pro3);
        \draw [arrow] (pro3) -- (pro4);
        \draw [arrow] (pro4) -- (pro5);
        \draw [arrow] (pro5) -- (pro6);
        \draw [arrow] (pro6) -- (dec1);
        \draw [arrow] (dec1) -- node [anchor=west] {Oui}(end);
        \draw [arrow] (dec1.west) |- node [anchor=west] {Non} (pro2);
    \end{tikzpicture}
    \caption{Algorithme génétique simple.}
\end{figure}
  • Welcome. // Please make it a habit to post only code, which will compile ... yours won't. // Look for "|-" or "-|" in the pgfmanual. Even more so when you code doesn't tell, how [arrow] is defined ... – MS-SPO Jun 10 '23 at 19:06
  • 1
    Q102385 and many of the linked ones. – Qrrbrbirlbel Jun 10 '23 at 19:07
  • Welcome to TeX.SX. When you post a question, always provide a "Minimal Working Example" (MWE) that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document} and compiles without errors, even if it does not produce your desired output. – Sandy G Jun 11 '23 at 03:03

0 Answers0