# Bug (?) in color of connection bars in TikZ mindmap

I have the following figure, with the code below:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}

\begin{tikzpicture}[small mindmap]
\node[concept, concept color=green] {Green\\node}
child[concept color=blue, grow=-65] {
node[concept] {Blue\\Node\\2}
child[concept color=red, grow=-60] { node[concept] {Red\\Node\\3} }
child[concept color=red, grow=-120] { node[concept] (r) {Red\\Node\\2} }
}
child[concept color=blue, grow=-120] {
node[concept] (b) {Blue\\Node\\1}
child[concept color=red, grow=-120] { node[concept] {Red\\Node\\1} }
};
\path (b) to[circle connection bar switch color=from (blue) to (red)] (r);
\end{tikzpicture}

\end{document}


Main question: Why is the color of the connection bars between the green node and the blue nodes incorrect? And how to correct this?

Side question: My way of placing the Red Node 2 as a child of Blue Node 2 and then connect it as I can to Blue Node 1 is kind of a ugly hack. How should one code this more properly?

Side side question: There is some rough description of the mindmap library in the Beamer user guide, but I have been unable to find some complete documentation. Does it exist?

• Try without small. – Sigur May 5 '15 at 16:43
• I get the same result! (For a minimal example, I should have removed small indeed.) – Bruno May 5 '15 at 16:44
• Answer to side side question: mindmaps are explained in sections "6 Tutorial: A Lecture Map for Johannes" and "58 Mindmap Drawing Library" from pgfmanual, which you can open on your system with command texdoc --view pgfmanual. – Ignasi May 5 '15 at 18:44
• I'm stupid: I saw section 6, but I didn't see section 58... Well, thanks! – Bruno May 5 '15 at 19:54

Setting concept color=green as a node option does not effect the connection to the first level children. Use it as an option of the tikzpicture.

\begin{tikzpicture}[mindmap,concept color=green]


You could place the Red Node 2 as an extra concept of level 2 in the middle of the Red Node 1 and Red Node 3. If you name the node the children will automatically be named.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}

\begin{tikzpicture}[mindmap,concept color=green]
\node[concept](mm) {Green\\node}
child[concept color=blue, grow=-60] {
node[concept] {Blue\\Node\\2}
child[concept color=red, grow=-60] { node[concept] {Red\\Node\\3} }
%child[concept color=red, grow=-120] { node[concept] (r) {Red\\Node\\2} }
}
child[concept color=blue, grow=-120] {
node[concept] {Blue\\Node\\1}
child[concept color=red, grow=-120] { node[concept] {Red\\Node\\1} }
};

\node[extra concept,level 2 concept,concept color=red](mm-1-1e2)at(mm|-mm-1-1){Red\\Node\\2};

\foreach \i in {1,2}
\path (mm-\i) to[circle connection bar switch color=from (blue) to (red)] (mm-1-1e2);
\end{tikzpicture}

\end{document}


There is a chapter "Mindmap Drawing Library" inside the pgfmanual.

• Thank you, this answers my three questions! I'll now have a look to the documentation, I'm pretty sure I can find all the answers I need (and more!). – Bruno May 5 '15 at 19:56