3

I would like to reproduce this diagram as shown here (Sorry if the picture is fuzzy) using the code from this Website I just was able to do this :

\documentclass{minimal}
\usepackage[a4paper,margin=1cm,landscape]{geometry}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,shadows,arrows}
\usepackage{booktabs}
\usepackage{diagbox}
\begin{document}
\tikzstyle{abstract}=[rectangle,  rounded corners, fill=blue!40, drop shadow,
        text centered, anchor=north, text=white, text width=6cm]
\tikzstyle{comment}=[rectangle, draw=black, rounded corners, fill=green, drop shadow,
        text centered, anchor=north, text=white, text width=3cm]
\tikzstyle{myarrow}=[->, >=open triangle 90, thick]
\tikzstyle{line}=[-, thick]
\begin{center}
\begin{tikzpicture}[node distance=2cm]
    \node (Item) [abstract, rectangle split, rectangle split parts=2]
        {
            \textbf{Existence et unicité des solutions}
                   };
    \node (AuxNode01) [text width=4cm, below=of Item] {};
    \node (Component) [abstract, rectangle split, rectangle split parts=2, left=of AuxNode01]
        {
            \textbf{Si $q=0$}
                    };
    \node (System) [abstract, rectangle split, rectangle split parts=2, right=of AuxNode01]
        {
            \textbf{Si $q \in ]-1,0[$}
                    };
    \node (AuxNode02) [text width=0.5cm, below=of Component] {};
    \node (Sensor) [abstract, rectangle split, rectangle split parts=2, left=of AuxNode02]
        {
            \textbf{$\beta_0^{\star} \leq \gamma + r_0(P^{\star}) - k_0 \eta_1$}
                    };
    \node (Part) [abstract, rectangle split, rectangle split parts=2, right=of AuxNode02]
        {
            \textbf{$\beta_0^{\star} > \gamma + r_0(P^{\star}) - k_0 \eta_1$}
                    };
            \node (AuxNode03) [below=of Sensor] {};
    \node (Pressure) [abstract, rectangle split, rectangle split parts=2, left=of AuxNode03]
        {
\begin{tabular}{c|ccc}
    \centering
    \backslashbox{$\tau$}{Equilibre}   &   $0$  &   $\tau$    &   $+ \infty$ \\ \hline
    $x_0$                              &   Existe   &   Existe   &   Existe\\
\end{tabular}
  };
     \node (AuxNode04) [below=of Part] {};
    \node (Pump) [abstract, rectangle split, rectangle split parts=2, left=of AuxNode04, xshift=2cm]
        {
             \begin{tabular}{|l|*{2}{c|}}
      \hline
      \diagbox{$\tau$}{Equilibre} & $0$ & $+ \infty$  \\
      \hline
      $x_0$&Existe&Existe \\
      \hline
      $x_1$&Existe& \\
      \hline
  \end{tabular}
        };
 \draw[myarrow] (Component.north) -- ++(0,0.8) -| (Item.south);
    \draw[line] (Component.north) -- ++(0,0.8) -| (System.north);
     \draw[myarrow] (Sensor.north) -- ++(0,0.8) -| (Component.south);
    \draw[line] (Sensor.north) -- ++(0,0.8) -| (Part.north);
     \draw[line] (Pressure.west) -- ++(-0.2,0);
\end{tikzpicture}
\end{center}
\end{document}

With this drawing peg. image

As usual, I ask you to give me a solution that satisfies me.

  • 1
    It would be great if you could explain what problem you are facing. – user121799 Jun 26 '18 at 22:40
  • Just one more comment: when writing my answer below, I realized that you had a \centering in one of your tables, which made the node positions go berserk. So if someone wants to write an answer using the outlined path, this might be the first thing to fix. (IMHO forest is more elegant, though.) – user121799 Jun 27 '18 at 0:56
1

I would use forest for that.

\documentclass[tikz,border=10pt]{standalone}
\usepackage{diagbox}
\usepackage{forest}
\usetikzlibrary{shapes,shadows.blur,arrows}
\begin{document}
\tikzset{abstract/.style={rectangle,  rounded corners, fill=blue!40,blur shadow,
        text centered, anchor=north, text=white,minimum width=6cm},
myarrow/.style={->, >=open triangle 90, thick}}
\begin{forest}
for tree={s sep+=4mm,l sep+=4mm,font=\bfseries\boldmath,abstract,child anchor=north,
edge path={\noexpand\path [draw,\forestoption{edge},myarrow] (!u.parent anchor) |-
([yshift=4mm].child anchor) -- (.child anchor)\forestoption{edge label};} 
}
[Existence et unicit\'e des solutions
 [{Si $q=0$}
  [{$\beta_0^{\star} \leq \gamma + r_0(P^{\star}) - k_0 \eta_1$}
   [{\begin{tabular}{|c|c|c|c|}
   \hline
    \backslashbox{$\tau$}{Equilibre}   &   $0$  &   $\tau$    &   $+ \infty$ \\ \hline
    $x_0$                              &   Existe   &   Existe   &   Existe\\
    \hline
\end{tabular}}]
  ]
  [{$\beta_0^{\star} > \gamma + r_0(P^{\star}) - k_0 \eta_1$}
   [{\begin{tabular}{|l|*{2}{c|}}
      \hline
      \diagbox{$\tau$}{Equilibre} & $0$ & $+ \infty$  \\
      \hline
      $x_0$&Existe&Existe \\
      \hline
      $x_1$&Existe& \\
      \hline
  \end{tabular}
        }]
  ]
 ]
 [{Si $q \in ]-1,0[$}
  [{$\beta_0^{\star} > \gamma + r_0(P^{\star}) - k_0 \eta_1$}
   [{\begin{tabular}{|l|*{2}{c|}}
      \hline
      \diagbox{$\tau$}{Equilibre} & $0$ & $+ \infty$  \\
      \hline
      $x_0$&Existe&Existe \\
      \hline
      $x_1$&Existe& \\
      \hline
  \end{tabular}
        }]
  ]
 ]
]
\end{forest}
\end{document}

enter image description here

Notice that for the two nodes on the bottom right, which I could not find in your MWE, I just copied other nodes since I can not really decipher your scan (and because marmots are lazy ;-).

P.S. I have removed your unicode character such that the thing can be compiled with pdflatex, in which case there is no problem using shadows.blur, which looks IMHO better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.