Nest child {node {}}
constructs where required; I produced two children for a3
and three for b3
, as requested.
You can use
circle connection bar switch color=from (<start color>) to (<endcolor>)
see the paths at the end of my exmaple code.
The code:
\documentclass{article}
\usepackage{tikz,times}
\usepackage[paperwidth=25cm,paperheight=22cm,left=1cm,top=1cm]{geometry}
\usetikzlibrary{mindmap,trees,backgrounds}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[mindmap,
level 1 concept/.append style={level distance=130,sibling angle=30}]
\begin{scope}[mindmap, concept color=gray,circle connection bar switch color=from (red) to (blue)]
\node [concept, ball color=red!50!black, scale=0.375] (a) {a}[clockwise from=-10]
child {node [concept, scale=0.6] (a1) {a1}}
child {node [concept, ball color=green!25!black, scale=0.6] (a2) {a2}}
child {node [concept, scale=0.6] (a3) {a3}
child {node[concept,scale=0.4] (a31) {a31}}
child {node[concept,scale=0.4] (a32) {a32}}
}
child {node [concept, scale=0.6] (a4) {a4}}
child {node [concept, scale=0.6] (a5) {a5}}
child {node [concept, ball color=green!25!black, scale=0.6] (a6) {a6}
};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
\node [concept, ball color=red!50!black, scale=0.375] (b) at ([xshift=2cm,yshift=3cm]a.east) {b}[clockwise from=50]
child {node [concept, ball color=green!25!black, scale=0.6] (b1) {b1}}
child {node [concept, ball color=green!25!black, scale=0.6] (b2) {b2}}
child {node [concept, scale=0.6] (b3) {b3}
child {node[concept,scale=0.4] (b31) {b31}}
child {node[concept,scale=0.4] (b32) {b32}}
child {node[concept,scale=0.4] (b33) {b33}}
}
child {node [concept, scale=0.6] (b4) {b4}};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
\node [concept, scale=0.375] (c) at ([xshift=-2cm,yshift=2cm]a.east) {c}[clockwise from=180]
child {node [concept, scale=0.6] (c1) {c1}}
child {node [concept, ball color=green!25!black, scale=0.6] (c2) {c2}}
child {node [concept, ball color=green!25!black, scale=0.6] (c3) {c3}};
\end{scope}
\begin{pgfonlayer}{background}
\path [circle connection bar]
(a4) edge (a5)
(a1) edge (b)
(a1) edge (b4)
(a6) edge (b)
(a) edge (c)
(a5) edge (c)
(b1) edge (c)
(c1) edge (c3)
(b1) edge (c);
\end{pgfonlayer}
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b2);
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b1);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a2);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a6);
\end{tikzpicture}
\end{document}
I propose here some modifications:
Use a small mindmap
instead of those scaling factors and enlarge the font (this I say for experience: reading the font with your original settings was a torture).
Change the position of some of the children; this improves a lot the aspect, since you can avoid some many crossing connectors; in particular the grow=<angle>
option for child can be really useful here (see a6
and c2
in the code below).
The modified code:
\documentclass{article}
\usepackage{tikz,times}
\usepackage[paperwidth=23cm,paperheight=22cm,left=1cm,top=1cm]{geometry}
\usetikzlibrary{mindmap,trees,backgrounds}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[small mindmap,every node/.append style={font=\large},
level 1 concept/.append style={level distance=130,sibling angle=30}]
\begin{scope}[mindmap, concept color=gray,circle connection bar switch color=from (red) to (blue)]
\node [concept, ball color=red!50!black] (a) {a}[clockwise from=-10]
child {node [concept] (a1) {a1}}
child {node [concept, ball color=green!25!black] (a2) {a2}}
child {node [concept] (a3) {a3}
child {node[concept] (a31) {a31}}
child {node[concept] (a32) {a32}}
}
child {node [concept] (a4) {a4}}
child {node [concept] (a5) {a5}}
child[grow=75] {node [concept, ball color=green!25!black] (a6) {a6}
};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
\node [concept, ball color=red!50!black] (b) at ([xshift=3cm,yshift=2cm]a.east) {b}[clockwise from=50]
child {node [concept, ball color=green!25!black] (b1) {b1}}
child {node [concept, ball color=green!25!black] (b2) {b2}}
child {node [concept] (b3) {b3}
child {node[concept] (b31) {b31}}
child {node[concept] (b32) {b32}}
child {node[concept] (b33) {b33}}
}
child {node [concept] (b4) {b4}};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
\node [concept] (c) at ([xshift=-3cm,yshift=6cm]a.east) {c}[clockwise from=180]
child {node [concept] (c1) {c1}}
child[grow=45] {node [concept, ball color=green!25!black] (c2) {c2}}
child {node [concept, ball color=green!25!black] (c3) {c3}};
\end{scope}
\begin{pgfonlayer}{background}
\path [circle connection bar]
(a4) edge (a5)
(a1) edge (b)
(a1) edge (b4)
(a6) edge (b)
(a) edge (c)
(a5) edge (c)
(b1) edge (c)
(c1) edge (c3)
(b1) edge (c);
\end{pgfonlayer}
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b2);
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b1);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a2);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a6);
\end{tikzpicture}
\end{document}
The result:
And a variation in which c
is a child of a
(you'll have to decide whether this is the case or not):
\documentclass{article}
\usepackage{tikz,times}
\usepackage[paperwidth=23cm,paperheight=22cm,left=1cm,top=1cm]{geometry}
\usetikzlibrary{mindmap,trees,backgrounds}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[small mindmap,every node/.append style={font=\large},
level 1 concept/.append style={level distance=130,sibling angle=30}]
\begin{scope}[mindmap, concept color=gray,circle connection bar switch color=from (red) to (blue)]
\node [concept, ball color=red!50!black] (a) {a}[clockwise from=-10]
child {node [concept] (a1) {a1}}
child {node [concept, ball color=green!25!black] (a2) {a2}}
child {node [concept] (a3) {a3}
child {node[concept] (a31) {a31}}
child {node[concept] (a32) {a32}}
}
child {node [concept] (a4) {a4}}
child {node [concept] (a5) {a5}}
child[grow=120] {node[concept] (c) {c}
child {node [concept] (c1) {c1}}
child[grow=45] {node [concept, ball color=green!25!black] (c2) {c2}}
child {node [concept, ball color=green!25!black] (c3) {c3}}
}
child[grow=55] {node [concept, ball color=green!25!black] (a6) {a6}
};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
\node [concept, ball color=red!50!black] (b) at ([xshift=4cm,yshift=2cm]a.east) {b}[clockwise from=50]
child[grow=110] {node [concept, ball color=green!25!black] (b1) {b1}}
child {node [concept, ball color=green!25!black] (b2) {b2}}
child {node [concept] (b3) {b3}
child {node[concept] (b31) {b31}}
child {node[concept] (b32) {b32}}
child {node[concept] (b33) {b33}}
}
child {node [concept] (b4) {b4}};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
% \node [concept] (c) at ([xshift=-3cm,yshift=6cm]a.east) {c}[clockwise from=180]
% child {node [concept] (c1) {c1}}
% child[grow=45] {node [concept, ball color=green!25!black] (c2) {c2}}
% child {node [concept, ball color=green!25!black] (c3) {c3}};
\end{scope}
\begin{pgfonlayer}{background}
\path [circle connection bar]
(a4) edge (a5)
(a1) edge (b)
(a1) edge (b4)
(a6) edge (b)
(a) edge (c)
(a5) edge (c)
(b1) edge (c)
% (c1) edge (c3)
(b1) edge (c);
\end{pgfonlayer}
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b2);
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b1);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a2);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a6);
\end{tikzpicture}
\end{document}
Adding a solid (i.e., not shaded) color for selected connection bars seems not to be as immediate as I thought; in the following example I defined a connection bar color
key allowing to assign solid colors (although one could use circle connection bar switch color=from (<color>) to (<color>)
but this could be computationally heavy since behind the scenes it is a shading):
\documentclass{article}
\usepackage{tikz,times}
\usepackage[paperwidth=23cm,paperheight=22cm,left=1cm,top=1cm]{geometry}
\usetikzlibrary{mindmap,trees,backgrounds}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[small mindmap,every node/.append style={font=\large},
level 1 concept/.append style={level distance=130,sibling angle=30},
connection bar color/.style={every circle connection bar/.append style={
append after command={[fill=#1]}}}]
\begin{scope}[mindmap, concept color=gray,circle connection bar switch color=from (red) to (blue)]
\node [concept, ball color=red!50!black] (a) {a}[clockwise from=-10]
child {node [concept] (a1) {a1}}
child {node [concept, ball color=green!25!black] (a2) {a2}}
child {node [concept] (a3) {a3}
child {node[concept] (a31) {a31}}
child {node[concept] (a32) {a32}}
}
child {node [concept] (a4) {a4}}
child {node [concept] (a5) {a5}}
child[grow=120] {node[concept] (c) {c}
child {node [concept] (c1) {c1}}
child[grow=45] {node [concept, ball color=green!25!black] (c2) {c2}}
child {node [concept, ball color=green!25!black] (c3) {c3}}
}
child[grow=55] {node [concept, ball color=green!25!black] (a6) {a6}
};
\end{scope}
\begin{scope}[mindmap, concept color=gray]
\node [concept, ball color=red!50!black] (b) at ([xshift=4cm,yshift=2cm]a.east) {b}[clockwise from=50]
child[grow=110] {node [concept, ball color=green!25!black] (b1) {b1}}
child {node [concept, ball color=green!25!black] (b2) {b2}}
child {node [concept] (b3) {b3}
child {node[concept] (b31) {b31}}
child {node[concept] (b32) {b32}}
child {node[concept] (b33) {b33}}
}
child {node [concept] (b4) {b4}};
\end{scope}
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b2);
\path
(b) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (b1);
\path
(a) to[circle connection bar switch color=from (red!80!black) to (green!85!black)] (a2);
\begin{scope}[circle connection bar,connection bar color=cyan!70!black]
\path
(a4) to (a5);
\path
(a1) to (b);
\path
(a1) to (b4);
\end{scope}
\path
(a6) to (b);
\begin{scope}[circle connection bar,connection bar color=orange!70!black]
\path
(a5) to (c);
\path
(b1) to (c);
\path
(c1) to (c3);
\path
(b1) to (c);
\end{scope}
\path
(a) to[circle connection bar,connection bar color=yellow!70!black] (a3);
\path
(a) to[circle connection bar,connection bar color=magenta!70!black] (a4);
\end{tikzpicture}
\end{document}