[Tex/LaTex] Tikz mindmap customize nodes color, distance and size

mindmapsnodestikz-pgftikz-styles

the code below is almost perfect to me but if I chose LateX it is to get the perfection.

There is 3 problems with the code below :

1) how can I modify the radius of the nodes (individually) ?

2) how can I change the distance from the root node to specific child (not all of them or with different values) ?

3) the color transition is not what I was expecting. Why is there black color ? And mostly how can I get the right color transition ?

Thanks for your help.

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

\begin{document}

\definecolor{violet}{RGB}{165, 75, 151}
\definecolor{bleuaefe}{RGB}{96, 67, 134}
\definecolor{rouge}{RGB}{204,21,26}
\definecolor{bleu}{RGB}{8,69,219}

\begin{center}

\begin{tikzpicture}[mindmap,
grow cyclic,
every node/.style={concept},
text=white,
root concept/.append style={
concept color=violet, font=\Large\scshape},
    level 1/.append style={font=\large\scshape},
    level 2/.append style={level distance=3cm,sibling angle=45},  % les nodes sont placés à une distance angulaire de 45° (sibling)
    informatique/.append style={concept color=bleu},
    mej/.append style={level distance=1cm,concept color=violet},
    can/.style={concept color=rouge},
    mom/.append style={concept color=violet},
    plusloin/.append style={concept color=bleuaefe}
    ]
\node[root concept]{Année de la Science Mathématiques} [counterclockwise from=45]% root
    child  { node[informatique]{Autour de l'algorithmique et de la cryptographie} [clockwise from=90,informatique]%
        child { node {Castor informatique} }
        child { node {Algoréa} }
        child { node {Alkindi} }
    }
    child  { node[mej,sibling angle=55]{MEJ} [counterclockwise from=55,mej]%on place le premier noeud à 55° puis on tourne dans le sens counterclockwise de sibling level 2
        child { node {En groupe jumelés} }
        child { node {de la cinquième à la terminale} }
        child { node {Septembre 2018 à avril 2018} }
    }
    child  { node[can,sibling angle=70]{CAN} [counterclockwise from=100,can]
        child { node {Novembre 2018 à mai 2019} }
        child { node {du CM1 à la seconde} }
        child { node {Individuel et classe} }
    }
    child { node[mom,sibling angle=60]{Mad over Maths} [counterclockwise from=180,mom]%[mom]
        child { node {Novembre 2018 à février 2019} }
        child { node {Élèves de première et seconde} }
        child { node {Compétition en équipe} }
    }
    child  { node[plusloin,sibling angle=120]{Pour aller plus loin...} [clockwise from=-15,plusloin]%
        child { node {Correspondances de jeunes mathématicien.nes\newline\includegraphics[scale=0.25]{correspondances_qrcode.png}} }
        child { node {Mathmosphère\newline\includegraphics[scale=0.25]{mathmosphere_qrcode.png}} }
        child { node {\includegraphics[scale=0.25]{france_ioi_qrcode.png}} }
    }
    ;
\end{tikzpicture}

\end{center}

\end{document}

Best Answer

You are using graphics files in the last three nodes that I do not have, so I had to comment them out. As for your questions:

  1. You can individually control the sizes of nodes by adding minimum size to their options. I added minimum size=3.4cm to the last direct child.
  2. If you add shift={(<angle>:<distance>)}, where the results look best if <angle> is the (sibling) angle of that node and distance the amount by which you want to move the node, this will change the distance. I add shift={(-30:1)} to the Correspondances node.
  3. You will get the right transitions if you follow the first example on p. 654 of the pgfmanual. Basically you need to pass the concept color of the parent node to the mindmap, not to the parent node. You'd then have to adjust the colors of the subnodes. After that example, the pgfmanual lists other options as well.

Here is the code:

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

\begin{document}

\definecolor{violet}{RGB}{165, 75, 151}
\definecolor{bleuaefe}{RGB}{96, 67, 134}
\definecolor{rouge}{RGB}{204,21,26}
\definecolor{bleu}{RGB}{8,69,219}

\begin{center}

\begin{tikzpicture}[mindmap,concept color=violet,
grow cyclic,
every node/.style={concept},
text=white,
root concept/.append style={
font=\Large\scshape},
    level 1/.append style={font=\large\scshape},
    level 2/.append style={level distance=3cm,sibling angle=45},  % les nodes sont placés à une distance angulaire de 45° (sibling)
    informatique/.append style={concept color=bleu},
    mej/.append style={level distance=1cm,concept color=violet},
    can/.style={concept color=rouge},
    mom/.append style={concept color=violet},
    plusloin/.append style={concept color=bleuaefe}
    ]
\node[root concept]{Année de la Science Mathématiques} [counterclockwise from=45]% root
    child  { node[informatique]{Autour de l'algorithmique et de la cryptographie} [clockwise from=90,informatique]%
        child { node {Castor informatique} }
        child { node {Algoréa} }
        child { node {Alkindi} }
    }
    child  { node[mej,sibling angle=55]{MEJ} [counterclockwise from=55,mej]%on place le premier noeud à 55° puis on tourne dans le sens counterclockwise de sibling level 2
        child { node {En groupe jumelés} }
        child { node {de la cinquième à la terminale} }
        child { node {Septembre 2018 à avril 2018} }
    }
    child  { node[can,sibling angle=70]{CAN} [counterclockwise from=100,can]
        child { node {Novembre 2018 à mai 2019} }
        child { node {du CM1 à la seconde} }
        child { node {Individuel et classe} }
    }
    child { node[mom,sibling angle=60]{Mad over Maths} [counterclockwise from=180,mom]%[mom]
        child { node {Novembre 2018 à février 2019} }
        child { node {Élèves de première et seconde} }
        child { node {Compétition en équipe} }
    }
    child  { node[plusloin,sibling angle=120,minimum size=3.4cm]{Pour aller plus loin...} [clockwise from=-15,plusloin]%
        child { node[shift={(-30:1)}] {Correspondances de jeunes mathématicien.nes\newline
        %\includegraphics[scale=0.25]{correspondances_qrcode.png}
        } }
        child { node {Mathmosphère\newline
        %\includegraphics[scale=0.25]{mathmosphere_qrcode.png}
        } }
        child { node {%\includegraphics[scale=0.25]{france_ioi_qrcode.png}
        } }
    }
    ;
\end{tikzpicture}

\end{center}

\end{document}

enter image description here

Clearly, this is not how the mindmap should ultimately look like but I believe I gave you some hints how to get there.