将前景效果应用于思维导图的子节点或将背景应用于父节点的分支

将前景效果应用于思维导图的子节点或将背景应用于父节点的分支

我需要节点子节点的“Tree”分支不与节点子节点“BIRD'S TO ...”重叠。我一直尝试加载库背景并在子节点“Tree”的选项中使用“在背景层上”,但这并没有触发更改。

这里是我的 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}

“Birds To ...” 很模糊

答案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,但在背景中,并且最小尺寸有所减小。这样,还可以创建节点子节点的多个后代,而不会混淆前一个子节点的文本。

我对 @samcarter 样品的灵感

   \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}

相关内容