使图表更圆润

使图表更圆润

我想重新创建这个图像在此处输入图片描述tikz

目前我正处于这一点,但我不知道如何改进我的代码以使其更流畅:

\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}             
\usepackage{float}
\usepackage{tikz} 
\usepackage{siunitx}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}

\definecolor{mycolor}{RGB}{31,22,70}
\definecolor{mycolor2}{RGB}{21,126,251}
\begin{document}  
       \begin{figure}[H]
        \centering
        \begin{tikzpicture}[
            scale=0.8,
            transform shape,
            show background rectangle,
            background rectangle/.style={fill=gray!10},
            box/.style={draw, font=\itshape}
            ]
            \coordinate (b) at (current page.center);
            \node[rounded corners=3mm, label=center:{Onboard}, fill=mycolor2!20] (onboard)at (b) [draw,minimum width=2.5cm,minimum height=2.4cm] {};

            \node[below right = of onboard, rounded corners=3mm, label=center:{Deploy}, fill=mycolor2!20] (deploy) [draw,minimum width=2.5cm,minimum height=2.4cm] {};

            \node[below right = of deploy,rounded corners=3mm, label=center:{Monitor}, fill=mycolor2!20] (monitor) [draw,minimum width=2.5cm,minimum height=2.4cm] {};

            \node[below left = of monitor, rounded corners=3mm, label=center:{Scale}, fill=mycolor2!20] (scale) [draw,minimum width=2.5cm,minimum height=2.4cm] {};

            \node[left =of scale, rounded corners=3mm, label=center:{healing/fault-recovery}, fill=mycolor2!20] (healing) [draw,minimum width=4cm,minimum height=2.4cm] {};

            \node[above left = of healing, rounded corners=3mm, label=center:{Update}, fill=mycolor2!20] (update)[draw,minimum width=2.5cm,minimum height=2.4cm] {};

            \node[above =of update, rounded corners=3mm, label=center:{Undeploy}, fill=mycolor2!20] (undeploy) [draw,minimum width=2.5cm,minimum height=2.4cm] {};
            \draw[thick, mycolor](onboard)--(deploy);
            \draw[thick, mycolor](deploy)--(monitor);
            \draw[thick, mycolor](monitor)--(scale);
            \draw[thick, mycolor](scale)--(healing);
            \draw[thick, mycolor](healing)--(update);
            \draw[thick, mycolor](update)--(undeploy);
            \draw[thick, mycolor,->](undeploy)--(onboard);
           \end{tikzpicture}
        \caption{xxx}
    \end{figure}

\end{document}      

输出如下: 在此处输入图片描述

答案1

这是给你的一个主意。

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta,bending}
\begin{document}
\begin{tikzpicture}[
    mynode/.style={fill=#1,minimum height=1cm,minimum width=2cm,rounded corners,
                   draw=white,very thick,font=\sffamily\color{white}},
    mynode/.default=gray]
\fill[gray!20] (-5,-5) rectangle (5,5);
\draw[-{Triangle Cap[cap angle=60,bend]},line width=.5cm,cyan] (0,3.5) arc (90:-250:3.5);
\node[mynode=blue!50] at (90:3.5) {Onboard};
\node[mynode] at (90-360/7:3.5) {Deploy};
\node[mynode=gray!50] at (90-720/7:3.5) {Monitor};
\end{tikzpicture}
\end{document}

在此处输入图片描述

您现在可以添加其余四个节点。

相关内容