我想绘制下面的图片tikz
,并尝试使用下面的MWE
\documentclass[border=2mm,tikz]{standalone}
\begin{document}
\begin{tikzpicture}[scale=2, fatnode/.style={circle, fill=blue!20, minimum size=15mm}]
\node[node] (A) at (0, 0) {Import};
\node[node] (B) at (2, 0) {Tidy};
\node[node] (C) at (4, 0) {Transform};
\node[node] (D) at (6, 2) {Visualize};
\node[node] (F) at (6, -2) {Model};
\node[node] (G) at (8, 0) {Communicate};
\draw [thick, ->] (A) -- (B) node[midway,above left] {};
\draw [thick, ->] (B) -- (C) node[midway,above right] {};
\draw [thick, ->] (C) (D) to [bend right=20] node[midway,right] {};
\end{tikzpicture}
\end{document}
我对弯曲箭头和阴影部分有疑问。我还想把它放在曲线边缘的框架中。
改良试验
\documentclass[border=2mm,tikz]{standalone}
\begin{document}
\begin{tikzpicture}[scale=2, fatnode/.style={circle, fill=blue!20, minimum size=15mm}]
\node[node] (A) at (0, 0) {Import};
\node[node] (B) at (2, 0) {Tidy};
\node[node] (C) at (4, 0) {Transform};
\node[node] (D) at (5.5, 0.4) {Visualize};
\node[node] (F) at (5, -1) {Model};
\node[node] (G) at (8, 0) {Communicate};
\node[node] (H) at (6.5, 0) {};
\draw [thick, ->] (A) -- (B) node[midway,above left] {};
\draw [thick, ->] (B) -- (C) node[midway,above right] {};
\draw [thick, ->] (H) -- (G) node[midway,above left] {};
\draw [->,thick,postaction={decorate,decoration={raise=-2.5ex,text along path,text align=center,text={|\sffamily|}}}] (C) to [bend left=45] (D);
\draw [->,thick,postaction={decorate,decoration={raise=-2.5ex,text along path,text align=center,text={|\sffamily|}}}] (D) to [bend left=45] (F);
\draw [->,thick,postaction={decorate,decoration={raise=-2.5ex,text along path,text align=center,text={|\sffamily|}}}] (F) to [bend left=45] (C);{};
\end{tikzpicture}
\end{document}
答案1
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{positioning,fit,backgrounds,arrows.meta}
\begin{document}
\begin{tikzpicture}[font=\sffamily,>=Latex,thick]]
\node (IMP) {Import};
\node[right=of IMP] (TIDY) {Tidy};
\node[right=of TIDY,cyan] (TRSFM) {Transform};
\node[above right=0.5cm and 1cm of TRSFM,cyan] (VSL) {Visualize};
\node[below right=0.5cm and 1cm of TRSFM] (MDL) {Model};
\begin{scope}[on background layer]
\node[fit=(TRSFM)(VSL)(MDL),fill=cyan!20,rounded corners] (RCTL) {};
\node[below right= 0pt and 2pt of RCTL.south west,cyan](EXPLR){\footnotesize Explore};
\end{scope}
\node[right=of RCTL] (CMCT) {Communicate};
\begin{scope}
\draw[->] (IMP) -- (TIDY);
\draw[->] (TIDY) -- (TRSFM);
\draw[->] (TRSFM.80) to[out=70,in=180] (VSL.180);
\draw[->] (VSL.-70) to[out=-50,in=50] (MDL.50);
\draw[->] (MDL.-170) to[out=-170,in=-80] (TRSFM.-80);
\draw[->] (RCTL) -- (CMCT);
\end{scope}
\node[fit=(IMP)(RCTL)(EXPLR)(CMCT),rounded corners,draw]{};
\end{tikzpicture}
\end{document}
您可以使用in
和out
调整箭头,甚至尝试使用贝塞尔曲线。