具有断续线条的 Tikz 风格

具有断续线条的 Tikz 风格

我怎样才能用 tikz 实现这种风格?

在此处输入图片描述

我从这个开始,但我不知道如何继续:

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning,arrows.meta}

\begin{document}
\begin{tikzpicture}[block1/.style={draw, minimum width=2cm, minimum height=1cm,rounded corners},
               >=Stealth]
\node[block1,label=above:text] (a) {one};
\node[block1, right=5cm of a] (b) {two};
\node[block1, right=5cm of b] (c) {three};

\draw [arrow] (a) ->  (b);
\draw [arrow] (b) ->  (c);

\end{tikzpicture}
\end{document}

生产:

在此处输入图片描述

答案1

这是一项建议。您的代码因这些行而产生错误\draw[arrow],我已修复此错误。

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning,arrows.meta}

\begin{document}
\begin{tikzpicture}[block1/.style={draw, minimum width=2cm, minimum height=1cm,rounded corners},
               >=Stealth]
\node[block1,label=above:text] (a) {one};
\node[block1, right=5cm of a] (b) {two};
\node[block1, right=5cm of b] (c) {three};

\draw [->] (a) --  (b);
\draw [->] (b) --  (c);

\foreach \X in {a,b,c}
{
\draw[dashed,blue!50!white] (\X.west) --++(0,2cm) coordinate[midway] (\X-w);
\draw[dashed,blue!50!white] (\X.east) --++(0,2cm) coordinate[midway] (\X-e);
\draw[latex-latex,blue!50!white] (\X-w)-- (\X-e) coordinate[midway] (\X-top);
}
\node[above=2mm of a-top,anchor=south,text width=1.5cm] (a-bla){bla bla bla};
\node[above=2mm of b-top,anchor=south,text width=1.5cm] (b-bla){bla bla bla bla};
\node[above=2mm of c-top,anchor=south,text width=1.5cm] (c-bla){bla bla bla bla
bla};
%
\draw[latex-latex,blue!50!white] (a-e)-- (b-w) coordinate[midway] (ab-top);
\draw[latex-latex,blue!50!white] (b-e)-- (c-w) coordinate[midway] (bc-top);
\node[above=2mm of ab-top,anchor=south,text width=4.5cm,align=center] (ab-bla){bla bla bla};
\node[above=2mm of bc-top,anchor=south,text width=4.5cm,align=center] (bc-bla){bla bla bla bla};
\end{tikzpicture}
\end{document}

在此处输入图片描述

请注意,您尚未使用该arrows.meta库。

相关内容