如何制作矩形流程图?

如何制作矩形流程图?

我在处理下图所示的问题时遇到了问题:在此处输入图片描述

我该如何在 overleaf 代码中编写代码?使用 tikz 包

\begin{tikzpicture} 
\draw[black, thick] (0,0) rectangle (3,2) node[pos=.5] {text};
\end{tikzpicture}

答案1

这只是为了让您有个开始。对于每个功能,您都可以在本网站上找到很多帖子,但可能还没有完全按照这种组合来介绍。

\documentclass[border=3.14mm,tikz]{standalone}
\usetikzlibrary{chains,positioning,calc,shapes.geometric}
\begin{document}
\begin{tikzpicture}[font=\sffamily,boxed/.style={minimum width=3cm,minimum height=2cm,draw,thick}] 
 \begin{scope}[local bounding box=upper]
  \begin{scope}[start chain=1 going below,every join/.style={-latex,thick},frm/.style={boxed,on chain=1,join}]
   \node[on chain=1](n0) {Training data set};
   \node[frm](n1) {abc};
   \node[frm](n2) {abc};
   \node[frm](n3) {abc};
   \node[frm](n4) {abc};
  \end{scope} 
  \node[boxed,right=3cm of n1] (n5) {abc}; 
  \node[boxed,right=3mm of n2] (n6) {abc}; 
  \node at (n0-|n6) (n7) {Testing data set};
  \node[boxed,right=1cm of n3] (n8) {abc}; 
  \end{scope}
  \draw let \p1=($(upper.east)-(upper.west)$) in 
   node[boxed,below=5mm of upper,minimum width=\x1] (n9) {abc};
  \node[below=3mm of n9,
    trapezium,trapezium left angle=60,trapezium right angle=120,
    minimum width=3cm,minimum height=1cm,draw,thick] (n10) {abc};
  \begin{scope}[every edge/.style={draw,-latex,thick}]  
   \path (n7) edge (n6) (n6.-140) edge (n9.north-|n6.-140) 
   (n1) edge (n5) (n5) edge (n9.north-|n5.south)
   (n6.south-|n8) edge (n8) (n8) edge (n9.north-|n8.south)
   (n4) edge (n9.north-|n4) (n9) edge (n10);
  \end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容