我需要子節點的“Tree”臂不與子節點“BIRD'S TO ...”重疊。我一直在嘗試加載庫背景並在子“樹”的選項中使用“在背景層上”,但這並沒有觸發更改。
這是我的 MWE 和問題圖像:
\documentclass{article}
\usepackage{tikz}
\usepackage[paperwidth=35cm,paperheight=39cm,left=2cm,top=2cm]{geometry}
\usetikzlibrary{mindmap}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[mindmap]
\centering
\tikzset{every node/.style={text width=2cm,minimum size=5cm}}
\node [concept, text=blue!50!black!10,align=center] at (0,0)
{\Huge Floor}
child [concept color=blue!50, grow=-90,level distance=412]
{node [concept] {\Huge Sky}
child [concept color=black!20!yellow!20!red!30!blue!10!green!30,grow=240,level distance=210]
{node [scale=0.9,concept] {\Huge BIRD'S TO..}}
child [concept color=black!20!yellow!20!red!30!blue!10!green!30,grow=240,level distance=410]
{node [scale=0.9,concept] {\Huge Tree.}}
}
;
\end{tikzpicture}
\end{document}
答案1
我建議將「鳥」節點放在完成的心智圖的頂部:
\documentclass{article}
\usepackage{tikz}
\usepackage[paperwidth=35cm,paperheight=39cm,left=2cm,top=2cm]{geometry}
\usetikzlibrary{mindmap}
\usetikzlibrary{calc}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[mindmap]
\centering
\tikzset{every node/.style={text width=2cm,minimum size=5cm}}
\node [concept, text=blue!50!black!10,align=center] at (0,0)
{\Huge Floor}
child [concept color=blue!50, grow=-90,level distance=412]
{node [concept] (sky) {\Huge Sky}
child [concept color=black!20!yellow!20!red!30!blue!10!green!30,grow=240,level distance=412]
% {node [scale=0.9,concept] {\Huge BIRD'S TO..}}
%child [concept color=black!20!yellow!20!red!30!blue!10!green!30,grow=240,level distance=410]
{node [scale=0.9,concept] (tree) {\Huge Tree.}}
}
;
\node [extra concept,text width=4.5cm,minimum size=4.5cm,fill=black!20!yellow!20!red!30!blue!10!green!30,draw=black!20!yellow!20!red!30!blue!10!green!30, text=black] at ($(tree)!0.5!(sky)$) {\huge BIRD'S TO..};
\end{tikzpicture}
\end{document}
答案2
受 @samcarter 解決方案的啟發,我創建了一個新的 MWE,僅包含與庫背景和範圍的使用相關的一項更改,以便子 Tree 節點引用父節點 Sky,但在後台,並且最小大小減小。這樣,也可以建立節點子節點的多個後代,而不會混淆前一個子節點的文字。
\documentclass{article}
\usepackage{tikz}
\usepackage[paperwidth=35cm,paperheight=39cm,left=2cm,top=2cm]{geometry}
\usetikzlibrary{mindmap,backgrounds}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[mindmap]
\centering
\tikzset{every node/.style={text width=2cm,minimum size=5cm}}
\node [concept, text=blue!50!black!10,align=center] at (0,0)
{\Huge Floor}
child [concept color=blue!50, grow=-90,level distance=412,on background layer]
{node [concept] (sky) {\Huge Sky}
child [concept color=black!20!yellow!20!red!30!blue!10!green!30,grow=240,level distance=210]
{node [scale=0.9,concept] {\Huge BIRD'S TO..}}};
\begin{scope}[on background layer]
\node [minimum size=3cm] at (sky) {}
child [concept color=black!20!yellow!20!red!30!blue!10!green!30,grow=240,level distance=410]
{node [scale=0.9,concept] {\Huge Tree.}};
\end{scope}
\end{tikzpicture}
\end{document}