如何解决节点重叠的问题?我想要n1的下方。
\usetikzlibrary{positioning}
\tikzset{every node/.style={blue,rounded corners}}
\begin{tikzpicture}
\node[draw,fill=yellow] (n1) {
\begin{minipage}{5cm}
alignment of nodes
with \verb|minipage|
long text
fourth line
\end{minipage}
};
\node[draw,fill=orange!25] (n2) [below =1cm of n1.west,anchor=west] {below node};
\node[draw,fill=green!25] (n3) [right = of n1.north east,anchor=north west] {
\begin{minipage}{5cm}
right node
with \verb|minipage|
tirth line.
\end{minipage}
};
\draw[<-,>=latex,red,very thick] (-.3,-1) to [out=0,in=180] (1,-1.5) node[right] {problem here.};
\end{tikzpicture}
我需要 n1 以下。
答案1
如果您希望节点位于节点底部边缘下方 1 厘米处,则应使用below = 1cm of n1.south west
而不是 。如果您只写,新节点将位于另一个节点中间下方 1 厘米处。.west
.west