Wie füge ich Tabellen in ein Flussdiagramm ein?

Wie füge ich Tabellen in ein Flussdiagramm ein?

Ich muss das Flussdiagramm wie in der folgenden Abbildung dargestellt zeichnen. Kann ich die Tabellen im LaTeX-Flussdiagramm als Knoten hinzufügen?

Mein Code:

\tikzstyle{c-rectangle2} = [rectangle, ultra thick, rounded corners, minimum width=2cm, minimum height=1cm,text centered, text width = 4cm, draw=black, fill=white]
\tikzstyle{arrow} = [ultra thick,->,>=stealth]
\begin{figure}[H]
\centering
\begin{tikzpicture}[node distance = 2cm]
    \node (start) [c-rectangle2] {start};
    \node (part) [c-rectangle2, below of=start] {data};
    \node (no) [c-rectangle2,below of=part, xshift=3cm] {A};
    \node (plane) [c-rectangle2,below of=no] {B};
    \node (cylindrical) [c-rectangle2,below of=plane] {C};
    \node (both) [c-rectangle2,below of=cylindrical] {D};
    \node (fixed) [c-rectangle2,below of=both] {E};     
    \draw[arrow] (start) -- (part);
    \draw[arrow] (part) |- (no);
    \draw[arrow] (part)[anchor=north, xshift=-1.5cm] |- (plane);
    \draw[arrow] (part)[anchor=north, xshift=-5cm] |- (cylindrical);
    \draw[arrow] (part)[anchor=north, xshift=-10cm] |- (both);
    \draw[arrow] (part)[anchor=north, xshift=-18cm] |- (fixed);
\end{tikzpicture}
\caption{Illustration of State of the Art}
\label{fig:Illustration of State of the Art}
\end{figure}
\begin{table}[H]
\begin{tabular}{|l|l|l|}
\hline
\rowcolor[HTML]{3531FF} 
 -                                      & {\color[HTML]{FFFFFF} 
 \textbf{Part1}} & {\color[HTML]{FFFFFF} \textbf{Part2}} \\ \hline
 \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
 & 0                                     \\ \hline
 \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
  & 0                                     \\ \hline
 \end{tabular}
 \end{table}

Bildbeschreibung hier eingeben

Antwort1

Willkommen bei TeX-SE. Ja, wie von ferahfeza angemerkt, können Sie das. Fügen Sie die Tabellen einfach zum Knoteninhalt hinzu. Und verwenden Sie bitte nicht \tikzstyle.

\documentclass{article}
\usepackage{colortbl}
\usepackage{tikz}
\usetikzlibrary{positioning}


\begin{document}
\tikzset{c-rectangle2/.style={rectangle, ultra thick, rounded corners, minimum
width=2cm, minimum height=1cm,text centered, text width = 4cm, draw=black,
fill=white},
arrow/.style={ultra thick,->,>=stealth}}
\begin{figure}[htb]
\centering
\begin{tikzpicture}[node distance = 2cm]
    \node (start) [c-rectangle2] {start};
    \node (part) [c-rectangle2, below of=start] {data};
    \node (no) [c-rectangle2,below of=part, xshift=3cm] {A};
    \node[right=1cm of no] (tabA){\begin{tabular}{|l|l|l|}
    \hline
    \rowcolor[HTML]{3531FF} 
     -                                      & \textcolor[HTML]{FFFFFF} 
     {\textbf{Part1}} & \textcolor[HTML]{FFFFFF}{\textbf{Part2}} \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
     & 0  \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
      & 0 \\ \hline \end{tabular}};
    \draw[arrow] (no) -- (tabA);
    \node (plane) [c-rectangle2,below of=no] {B};
    \node[right=1cm of plane] (tabB){\begin{tabular}{|l|l|l|}
    \hline
    \rowcolor[HTML]{3531FF} 
     -                                      & \textcolor[HTML]{FFFFFF} 
     {\textbf{Part1}} & \textcolor[HTML]{FFFFFF}{\textbf{Part2}} \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
     & 0  \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
      & 0 \\ \hline \end{tabular}};
    \draw[arrow] (plane) -- (tabB);
    \node (cylindrical) [c-rectangle2,below of=plane] {C};
    \node[right=1cm of cylindrical] (tabC){\begin{tabular}{|l|l|l|}
    \hline
    \rowcolor[HTML]{3531FF} 
     -                                      & \textcolor[HTML]{FFFFFF} 
     {\textbf{Part1}} & \textcolor[HTML]{FFFFFF}{\textbf{Part2}} \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
     & 0  \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
      & 0 \\ \hline \end{tabular}};
    \draw[arrow] (cylindrical) -- (tabC);
    \node (both) [c-rectangle2,below of=cylindrical] {D};
    \node[right=1cm of both] (tabD){\begin{tabular}{|l|l|l|}
    \hline
    \rowcolor[HTML]{3531FF} 
     -                                      & \textcolor[HTML]{FFFFFF} 
     {\textbf{Part1}} & \textcolor[HTML]{FFFFFF}{\textbf{Part2}} \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
     & 0  \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
      & 0 \\ \hline \end{tabular}};
    \draw[arrow] (both) -- (tabD);
    \node (fixed) [c-rectangle2,below of=both] {E}; 
    \node[right=1cm of fixed] (tabE){\begin{tabular}{|l|l|l|}
    \hline
    \rowcolor[HTML]{3531FF} 
     -                                      & \textcolor[HTML]{FFFFFF} 
     {\textbf{Part1}} & \textcolor[HTML]{FFFFFF}{\textbf{Part2}} \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
     & 0  \\ \hline
     \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
      & 0 \\ \hline \end{tabular}};
    \draw[arrow] (fixed) -- (tabE);
    \draw[arrow] (start) -- (part);
    \draw[arrow] (part) |- (no);
    \draw[arrow] (part)[anchor=north, xshift=-1.5cm] |- (plane);
    \draw[arrow] (part)[anchor=north, xshift=-5cm] |- (cylindrical);
    \draw[arrow] (part)[anchor=north, xshift=-10cm] |- (both);
    \draw[arrow] (part)[anchor=north, xshift=-18cm] |- (fixed);
\end{tikzpicture}
\caption{Illustration of State of the Art}
\label{fig:Illustration of State of the Art}
\end{figure}
\begin{table}[htb]
\begin{tabular}{|l|l|l|}
\hline
\rowcolor[HTML]{3531FF} 
 -                                      & \textcolor[HTML]{FFFFFF} 
 {\textbf{Part1}} & \textcolor[HTML]{FFFFFF}{\textbf{Part2}} \\ \hline
 \cellcolor[HTML]{DAE8FC}\textbf{Part1} & 0                                     
 & 0                                     \\ \hline
 \cellcolor[HTML]{DAE8FC}\textbf{Part2} & 0                                     
  & 0                                     \\ \hline
 \end{tabular}
 \end{table}

\end{document} 

Bildbeschreibung hier eingeben

verwandte Informationen