tikz 思维导图中极细的连接栏

tikz 思维导图中极细的连接栏

使用 pdflatex 编译以下 MWE 时:

\documentclass{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}[
  small mindmap,
  concept color=OrangeRed,
  every node/.style={concept}
]

\node{root}
  [counterclockwise from=30]
  child[concept color=Orange] {
    node { child 1 }
    [counterclockwise from=-60]
    child { node{grandchild 2} }
    child { node{grandchild 3} }
    child { node{grandchild 4} }
    child { node{grandchild 5} }
  }
  child[concept color=Gold] {
    [counterclockwise from = 80]
    node {child 2}
    child { node{grandchild 6} }
    child { node{grandchild 7} }
  }
  child[concept color=Coral] {
    node {child 3}
    [counterclockwise from = 90]
    child { node{grandchild 8} }
    child { node{grandchild 9} }
    child { node{grandchild 10} }
  }
  child[concept color=LightSalmon] {
    node {child 4 }
    [counterclockwise from =160]
    child { node{grandchild 11} }
    child { node{grandchild 12} }
    child { node{grandchild 13} }
  }
  child[concept color=Orange!50!white] {
    node {child 5 }
    [counterclockwise from=220]
    child { node{grandchild 14} }
    child { node{grandchild 15} }
    child { node{grandchild 16} }
  }
;
\end{tikzpicture}
\end{document}

root和之间的连接条child 2看起来非常细:

思维导图

这似乎并不依赖于连接的确切角度,也不依赖于child 2在子节点序列中的位置root(节点的标签和颜色都不会改变任何东西)。那里出了什么问题?

答案1

问题是你交换了顺序:[counterclockwise from = 80]需要在之后进行node {child 2}

\documentclass{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}[
  small mindmap,
  concept color=OrangeRed,
  every node/.style={concept}
]

\node{root}
  [counterclockwise from=30]
  child[concept color=Orange] {
    node { child 1 }
    [counterclockwise from=-60]
    child { node{grandchild 2} }
    child { node{grandchild 3} }
    child { node{grandchild 4} }
    child { node{grandchild 5} }
  }
  child[concept color=Gold] {
    node {child 2}
    [counterclockwise from = 80]
    child { node{grandchild 6} }
    child { node{grandchild 7} }
  }
  child[concept color=Coral] {
    node {child 3}
    [counterclockwise from = 90]
    child { node{grandchild 8} }
    child { node{grandchild 9} }
    child { node{grandchild 10} }
  }
  child[concept color=LightSalmon] {
    node {child 4 }
    [counterclockwise from =160]
    child { node{grandchild 11} }
    child { node{grandchild 12} }
    child { node{grandchild 13} }
  }
  child[concept color=Orange!50!white] {
    node {child 5 }
    [counterclockwise from=220]
    child { node{grandchild 14} }
    child { node{grandchild 15} }
    child { node{grandchild 16} }
  }
;
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容