1

When compiling the following MWE with pdflatex:

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

The connection bar between root and child 2 appears extremely thin:

mindmap

This does not seem to depend on the exact angle where the connection is done nor on the position of child 2 in the sequence of children of root (and neither the nodes' labels nor the colors change anything). What is wrong there?

  • NB: I've uploaded a png, since, as mentioned in this meta-question, uploading pdf seems impossible at the moment. – Virgile Apr 2 '19 at 16:40
2

The issue is that you swapped the order: [counterclockwise from = 80] needs to go after 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}

enter image description here

|improve this answer|||||
  • Argl, how could I've missed that 😢. Thanks for spotting it so quickly anyway (I'm not sure I want to know why putting the options before the node results in such a symptom while still putting grandchild6 at the good place, though) – Virgile Apr 2 '19 at 17:25
  • 1
    @Virgile This is because when grandchild 6 is drawn, the angle is 80 regardless of the order. However, when the connection of child 2 is drawn, the order is important because if you say [counterclockwise from = 80] too early TikZ has an incorrect angle for the connection. (At least I think that's what's going on.) – user121799 Apr 2 '19 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.