如何在 tikzpicture 中的两个子节点之间创建空间?

如何在 tikzpicture 中的两个子节点之间创建空间?

显示了我的代码和相关图片。如何在两个子注释之间创建空格并将节点保留在 tikzpicture 中?

在此处输入图片描述

\begin{figure*}
    \centering
    \begin{tikzpicture} [baseline=-0.5ex] 
\begin{scope}[sibling distance=10cm,
  every node/.style = {,shape=rectangle, rounded corners,
    draw, align=center, minimum size=.75cm,
    top color=white, align=center, bottom color=blue!20}]]
    \node (a) at (0,2) {Goal : Company sustainability };
    \node (c2) at (-1,0)  {Governance};
    \node (c3) at (0,0)  {Proper time};
    \node (c1) at (-2,0){Skill Man power};
     \node (c4) at (1,0) {Logistic Support};
      \node (c5) at (2,0) {Work atmosphere};
    \node (a1) at (-2,-2) {Expected Salary};
    \node (a2) at (-1,-2) {Employee flexibility };
    \node (a3) at (0,-2) {Boss Behaviour };
    \node (a4) at (1,-2) {Project Presentation };
    \node (a5) at (2,-2) {Switching Department};
\end{scope}
\draw (a)--(c1) (a) -- (c2) (a) -- (c3)  (a)-- (c4) (a)-- (c5) 
(c1) -- (a1) (c1) -- (a2) (c1) -- (a3) (c1) -- (a4) (c1) -- (a5)
(c2) -- (a1) (c2) -- (a2) (c2) -- (a3) (c2) -- (a4) (c2) -- (a5)
(c3) -- (a1) (c3) -- (a2) (c3) -- (a3) (c3) -- (a4) (c3) -- (a5)
(c4) -- (a1) (c4) -- (a2) (c4) -- (a3) (c4) -- (a4) (c4) -- (a5)
(c5) -- (a1) (c5) -- (a2) (c5) -- (a3) (c5) -- (a4) (c5) -- (a5)
;
\end{tikzpicture}
    \caption{Caption}
    \label{fig:my_label}
\end{figure*}

答案1

有森林。(我很可能弄错了你的物品顺序,很抱歉!)

\documentclass[border=3mm]{standalone}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={shape=rectangle, rounded corners,
    draw, align=center, minimum size=.75cm,
    top color=white, align=center, bottom color=blue!20,
    l sep+=10mm}
[Goal : Company sustainability,alias=n0
 [Governance,alias=n1-1
  [Proper time,alias=n2-1]
 ] 
 [Skill Man power,alias=n1-2
  [Logistic Support,alias=n2-2]
 ] 
 [Work atmosphere,alias=n1-3
  [Expected Salary,alias=n2-3]
 ]
 [Employee flexibility,alias=n1-4
  [Boss Behaviour,alias=n2-4]
 ] 
 [Project Presentation,alias=n1-5 
  [Switching Department,alias=n2-5]
 ] 
]
\foreach \X in {1,...,5}  
{\foreach \Y in {1,...,5}
{\ifnum\X=\Y
\else
\draw (n1-\X) to[out=-90,in=90,looseness=0.3] (n2-\Y);
\fi}  } 
\end{forest}
\end{document}

在此处输入图片描述

相关内容