Tikz 思维导图覆盖特定节点的级别距离和兄弟角度
Tikz mindmaps overriding level distance and sibling angle for a specific node
是否有任何方法可以覆盖特定节点的定义水平距离和兄弟角度?例如,如果我有以下
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{mindmap,trees}
\usepackage{verbatim}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[mindmap, grow cyclic, every node/.style=concept, concept color=black, text=white,
level 1/.append style={level distance=5cm,sibling angle=60},
level 2/.append style={level distance=3cm,sibling angle=45},
level 3/.append style={level distance=3cm,sibling angle=30}]
\node {RootNode}
child { node {NodeA}
child { node {NodeA1}}
child { node {NodeA2}}
child { node {NodeA3}}
}
child { node {NodeB}
child { node {NodeB1}}
child { node {NodeB2}}
}
child { node {NodeC}
[clockwise from=90]
child { node {NodeC1}}
child { node {NodeC2}}
child { node {NodeC3}}
child { node {NodeC4}}
child { node {NodeC5}}
}
child {node {NodeD}
child {node {NodeD1}}
child {node {NodeD2}}
}
child { node {NodeE}
child {node {NodeE1}}
child {node {NodeE2}}
}
;
\end{tikzpicture}
\end{document}
是否有可能将 NodeC 推离 RootNode 更远(更长的水平距离)并仅减小 NodeC 的兄弟角度。我知道我可以使用 grow 手动定位兄弟节点。
谢谢
您可以更改该特定节点的属性:
...
child[level distance=6cm,level 2/.append style={sibling angle=35}] { node {NodeC}
...
是否有任何方法可以覆盖特定节点的定义水平距离和兄弟角度?例如,如果我有以下
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{mindmap,trees}
\usepackage{verbatim}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[mindmap, grow cyclic, every node/.style=concept, concept color=black, text=white,
level 1/.append style={level distance=5cm,sibling angle=60},
level 2/.append style={level distance=3cm,sibling angle=45},
level 3/.append style={level distance=3cm,sibling angle=30}]
\node {RootNode}
child { node {NodeA}
child { node {NodeA1}}
child { node {NodeA2}}
child { node {NodeA3}}
}
child { node {NodeB}
child { node {NodeB1}}
child { node {NodeB2}}
}
child { node {NodeC}
[clockwise from=90]
child { node {NodeC1}}
child { node {NodeC2}}
child { node {NodeC3}}
child { node {NodeC4}}
child { node {NodeC5}}
}
child {node {NodeD}
child {node {NodeD1}}
child {node {NodeD2}}
}
child { node {NodeE}
child {node {NodeE1}}
child {node {NodeE2}}
}
;
\end{tikzpicture}
\end{document}
谢谢
您可以更改该特定节点的属性:
...
child[level distance=6cm,level 2/.append style={sibling angle=35}] { node {NodeC}
...