11

I'm new on LaTeX and I started to learn it especially to design mindmap thing. My aim is to synthesize a math course with many concepts (like 40 theorems) on a mindmap able to reach level 4, 5 or 6 while optimizing its size. I did many researches and I found this topic : Mindmaps, general method to get regular/harmonious circle shape for level 3 and more great level 4!

Besides, I don't find the code that allowed the author to create this beautiful mindmap. I took and modify the last piece of code of the article, made by another person, which works with the level 3 but I have some issues with the level 4, here is my code :

\documentclass[tikz,border=2]{standalone}
\usetikzlibrary{mindmap, decorations.pathmorphing}

\makeatletter
\newcount\tikz@count@leaf % count only leaf
\def\tikz@grow@concentric{
    \pgftransformreset%
    \pgftransformshift{\pgfpoint
        {\pgfkeysvalueof{/tikz/smuggle xshift}}
        {\pgfkeysvalueof{/tikz/smuggle yshift}}}
    \pgftransformrotate{
        \pgfkeysvalueof{/tikz/smuggle rotation}+
        (\pgfkeysvalueof{/tikz/sibling angle})*(\tikz@count@leaf)}
    \ifnum\pgfkeysvalueof{/tikz/nold}=0
        % this is a leaf
        \global\advance\tikz@count@leaf by1
    \else
        % this is not a leaf
        % we need to rotate it further
        \pgftransformrotate{
            (\pgfkeysvalueof{/tikz/sibling angle})*
            (\pgfkeysvalueof{/tikz/nold}-1)/2}
        \tikzset{nold/.initial=0} % reset for safty
    \fi
    \pgftransformxshift{\the\tikzleveldistance}
}

\begin{document}
\tikzset{
    smuggle rotation/.initial=0,
    smuggle xshift/.initial=0pt,
    smuggle yshift/.initial=0pt,
    Xshift/.style={xshift=#1,smuggle xshift=#1},
    Yshift/.style={yshift=#1,smuggle yshift=#1},
    Rotate/.style={smuggle rotate=#1},
    nold/.initial=0, % hint tikz the number of leaf in its descendants
    % explain: don't count a child if they have your grand-child
    branch color/.style={
        concept color=#1!white,
        every child/.append style={concept color=#1!white!30!white},
    }
}
\tikzstyle{circle connection bar}=[to path={[every circle connection bar] decorate [decoration={bent}] { -- (\tikztotarget) \tikztonodes}},
append after command={[fill=white,draw=black]}]
\begin{tikzpicture}
%    \draw foreach\i in{1,...,36}{
%       (0:0)--(\i*10:15)
%    };
    \begin{scope}[text width=1.5cm,
            mindmap,
            growth function=\tikz@grow@concentric,
            sibling angle=15,
            nodes={concept, draw=blue!30, minimum size=0cm, inner sep=1mm},
            concept color=orange!60,
            level 1/.style={
                level distance=8cm,
                minimum size=3.0cm,text width=2.5cm
            },
            level 2/.style={
                level distance=12cm,
                minimum size=2.0cm,text width=2.0cm
            },
            level 3/.style={
                level distance=15cm,
                minimum size=2.0cm,text width=2.0cm
            }
            level 4/.style={
                level distance=15cm,
                minimum size=2.0cm,text width=2.0cm
            }
        ]
        \node [root concept]{Dimension finie}
        child[nold=9]{node {EV de DF} 
            child[nold=2] {node {L. Steinitz}
                    child[nold=1] {node {T. Base intermédiaire}
                child {node {T. Base incomplète}}
                }
            child {node {P. Dim infinie}} 
            } 
        child[nold=1] {node {T. Dim de f. libres, génératrices, bonux 1}
            child{node{T. Bonux 2}}
                    }
                child {node {P. Dim d'un produit}}
        child[nold=5] {node {P. Grassman}
            child{node {P. Non généralisation de Grassman}}
            child[nold=2]{node {P. Dim de sommes directes}
                child{node {P. Supplémentaires}}
                child{node {T. Bonux 3 des supplé.}} 
                }
            child[nold=2]{node {D. Le rang}
                child{node {P. sur le rang}}
                child{node {P. Rang, lib, gén, base}}
                }
            }
            }
        child[nold=8]{node {ALM}
            child[nold=3]{ node (equity) {Equity}
                child { node {Indices}}
                child { node {Stocks}}
                child { node {ETFs}}
            }
            child[nold=3]{ node (commo) {Commodities}
                child { node {Soft commo}}
                child { node {Precious}}
                child { node {Oil/Gas}}
            }
            child {node {Assurances}}
            child {node {Caisse de retraite}}
        }
        child[nold=1]{node {Directions financieres}
            child {node {Corporate}}
        }
        child[nold=3]{node {Instrument specialists} 
            child {node {Asset Managers traditionnels}}
            child {node {Hedge funds}}
            child {node {Trading desks form other banks}}
        }
        ;
    \end{scope}
\end{tikzpicture}
\end{document}

enter image description here On top of that, I wonder if it is possible to modify the level distance of the level 3 and the level 4, for having far bigger bubbles, because they seem locked to allow growth function to make a good circle.

Finally, I will put my theorems and propositions into rectangles instead of bubbles, let me know if you have any advice to optimize this style (level distance between rectangles is very hard to use because it bases itself on the rectangle's center)

Thank you for all !

belinx
  • 111
  • 2
  • 2
    Welcome! I am afraid that "on a mindmap able to reach level 4, 5 or 6 while optimizing its size" is a highly ambitious goal. Especially if not all the nodes have the same size. So this is just to mention that it might not be easy to flesh out a complete solution. One basically would need to write a version of forest that has a circular growth. –  Apr 18 '20 at 22:36
  • If your mindmap has few (let's say 4) level 1, maybe consider using each node at level 1 and cluster the min maps after? You'd have 4 mindmaps. Each à quarter circle to recreate a full circle? – JeT Apr 19 '20 at 01:09

1 Answers1

15

One can cook up some growth function for that. Here is a version that stores the configuration in the aux file and uses it in the second run. It basically records how many nodes arise at a given level and uses this information for the layout. It does reconstruct the graph the code of which you are asking for qualitatively.

\documentclass[tikz,border=9]{standalone}
\usetikzlibrary{mindmap,decorations}
\makeatletter
\newcount\tikzcountchildi
\newcount\tikzcountchildii
\newcount\tikzcountchildiii
\newcount\tikzcountchildiv
\newcount\tikzcountchildv
\newcount\tikzcountchildvi
\tikzset{garlic growth/.style={growth function=\tikz@grow@garlic,
/tikz/mmap/name=#1,mmap/#1/.is family,
mmap/initialize counts,
execute at end scope={%
\tikz@mmap@store@aux{n-i}{\the\tikzcountchildi}%
\tikz@mmap@store@aux{n-ii}{\the\tikzcountchildii}%
\tikz@mmap@store@aux{n-iii}{\the\tikzcountchildiii}%
\tikz@mmap@store@aux{n-iv}{\the\tikzcountchildiv}%
\tikz@mmap@store@aux{n-v}{\the\tikzcountchildv}%
\tikz@mmap@store@aux{n-vi}{\the\tikzcountchildvi}}},
mmap/.cd,initialize counts/.code={\tikzcountchildi=0%
\tikzcountchildii=0%
\tikzcountchildiii=0%
\tikzcountchildiv=0%
\tikzcountchildv=0%
\tikzcountchildvi=0%
}
}
\def\tikz@mmap@store@aux#1#2{%
\immediate\write\@mainaux{\string\expandafter\xdef\noexpand\csname pgfk@/tikz/mmap/\pgfkeysvalueof{/tikz/mmap/name}/#1\string\endcsname{#2}}}%
\def\tikz@mmap@get@from@aux#1#2{%
\ifcsname pgfk@/tikz/mmap/\pgfkeysvalueof{/tikz/mmap/name}/#1\endcsname
\edef#2{\csname pgfk@/tikz/mmap/\pgfkeysvalueof{/tikz/mmap/name}/#1\endcsname}%
\else
\edef#2{0}%
\fi
}

\newcount\tikzcountgrandchild
\def\tikz@grow@garlic{%
  \pgfmathsetmacro{\pgfutil@tempa}{\pgfkeysvalueof{/tikz/mmap/overall rotation}}%
  \ifcase\tikztreelevel 
  \or
   \global\advance\tikzcountchildi by1\relax%
   \tikz@mmap@get@from@aux{n-i}{\myni}%
   \tikz@mmap@get@from@aux{n-ii}{\mynii}%
   \tikz@mmap@get@from@aux{n-1-\the\tikzcountchildi}{\mynall}%
   \tikz@mmap@get@from@aux{p-1-\the\tikzcountchildi}{\mypi}%
   \ifnum\mynii>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}%
        *(\pgfkeysvalueof{/tikz/mmap/child weight}*(\mypi)*360/\mynii+%
            (1-\pgfkeysvalueof{/tikz/mmap/child weight})*(\tikzcountchildi-1)*360/\myni)}%
   \fi
  \or
   \global\advance\tikzcountchildii by1\relax%
   \tikz@mmap@get@from@aux{n-ii}{\mynii}%
   \tikz@mmap@get@from@aux{n-1-1}{\mynall}%
   \ifnum\mynii>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}%
    *(\tikzcountchildii-1-\mynall/2)*360/\mynii}%
   \fi
   \ifnum\tikznumberofcurrentchild=1\relax
    \tikz@mmap@store@aux{n-1-\the\tikzcountchildi}{\the\tikznumberofchildren}%
    \tikz@mmap@store@aux{p-1-\the\tikzcountchildi}{\the\numexpr\tikzcountchildii-1}%
    \tikz@mmap@store@aux{a-1-\the\tikzcountchildi-\the\tikzcountchildii}{\pgfutil@tempa}%
   \fi   
  \or
   \global\advance\tikzcountchildiii by1\relax%
   \ifnum\tikznumberofcurrentchild=1\relax
    \tikz@mmap@store@aux{n-1-\the\tikzcountchildi-\the\tikzcountchildii}{\the\tikznumberofchildren}%
    \tikz@mmap@store@aux{p-1-\the\tikzcountchildi-\the\tikzcountchildii}{\the\numexpr\tikzcountchildiii-1}%
   \fi   
   \tikz@mmap@get@from@aux{n-iii}{\myniii}%
   \tikz@mmap@get@from@aux{a-1-1-1}{\bettera}%
   \tikz@mmap@get@from@aux{n-1-1-1}{\mynall}%
   \ifdim\bettera pt=0pt\relax
   \else
    \pgfmathsetmacro{\pgfutil@tempa}{\bettera}%
   \fi
   \ifnum\myniii>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}%
     *(\tikzcountchildiii-1-\mynall/2)*360/\myniii}%
   \fi  
  \or
   \global\advance\tikzcountchildiv by1\relax%
   \tikz@mmap@get@from@aux{n-iv}{\myniv}%
   \ifnum\myniv>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}*(\tikzcountchildiv-1)*360/\myniv}%
   \fi  
  \or
   \tikz@mmap@get@from@aux{n-v}{\mynv}%
   \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}*(\tikzcountchildv-1)*360/\mynv}%
   \ifnum\mynv>0
    \global\advance\tikzcountchildv by1\relax%
   \fi
  \or
   \global\advance\tikzcountchildvi by1\relax%
   \tikz@mmap@get@from@aux{n-vi}{\mynvi}%
   \ifnum\myvi>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+(\tikzcountchildvi-1)*360/\mynvi}%
   \fi  
  \fi
  \pgftransformreset% 
  \pgftransformshift{\pgfpoint{\pgfkeysvalueof{/tikz/mmap/overall xshift}}%
        {\pgfkeysvalueof{/tikz/mmap/overall yshift}}}%
  \pgftransformrotate{\pgfutil@tempa}%
  \pgftransformxshift{\the\tikzleveldistance}%
}
\makeatother
\begin{document}
\tikzset{mmap/.cd,
    name/.initial=undef,
    overall rotation/.initial=0,
    overall xshift/.initial=0pt,
    overall yshift/.initial=0pt,
    sign/.initial=1,
    child weight/.initial=0.5,
    /tikz/.cd,
    Xshift/.style={xshift=#1,mmap/overall xshift=#1},
    Yshift/.style={yshift=#1,mmap/overall yshift=#1},
    branch color/.style={
        concept color=#1!80,ball color=#1!50,
        every child/.append style={concept color=#1!50},
    }
}

\begin{tikzpicture}
    \begin{scope}[
            mindmap,garlic growth=A,mmap/child weight=0,
            mmap/overall rotation=-70,mmap/sign=-1,
            nodes={concept,align=center, text width=2.5cm,inner sep=1mm},
            concept color=orange!60,
            level 1/.style={nodes=concept,
                %every child/.append style={concept color=orange},
                level distance=5cm,
            },
            level 2/.style={%opacity=0,
                %every child/.append style={concept color=blue},
                level distance=10cm,
                minimum size=2.0cm
            },
            level 3/.style={%opacity=0,
                %every child/.append style={concept color=green!70!black},
                level distance=15cm,sibling angle=40,
                minimum size=2.0cm,
            },
            level 4/.style={%opacity=0,
                %level distance=20cm,
                minimum size=2.0cm,text width=2.0cm
            }
        ]
        \node [root concept,ball color=orange!50]{Core}
          child[branch color=yellow]{node[shading=ball] {Core-1}
            child {node {Core-1-1}
                child {node {Core-1-1-1}}
                child {node {Core-1-1-2}}
                child {node {Core-1-1-3}}
                }
            child {node {Core-1-2}
                child {node {Core-1-2-1}}
                child {node {Core-1-2-2}}
                child {node {Core-1-2-3}}
                }
            child {node {Core-1-3}
                child {node {Core-1-3-1}}
                }
            child {node {Core-1-4}
                child {node {Core-1-4-1}}
                }
            child {node {Core-1-5}
                child {node {Core-1-5-1}}
                child {node {Core-1-5-2}}
                }
            }   
          child[branch color=blue]{node[shading=ball] {Core-2}
            child {node {Core-2-1}
                child {node {Core-1-1-1}}
                child {node {Core-1-1-2}}
                }
            child {node {Core-2-2}
                child {node {Core-2-2-1}}
                child {node {Core-2-2-2}}
                child {node {Core-2-2-3}}
                child {node {Core-2-2-4}}
                }
            }   
          child[branch color=red]{node[shading=ball] {Core-3}
            child {node {Core-3-1}
                child {node {Core-3-1-1}}
                child {node {Core-3-1-2}}
                }
            child {node {Core-3-2}
                child {node {Core-3-2-1}}
                child {node {Core-3-2-2}}
                }
            child {node {Core-3-3}
                child {node {Core-3-3-1}}
                child {node {Core-3-3-2}}
                }
            child {node {Core-3-4}
                }
            }   
          child[branch color=gray]{node[shading=ball] {Core-4}
            child {node {Core-4-1}
                child {node {Core-4-1-1}}
                child {node {Core-4-1-2}}
                }
            child {node {Core-4-2}
                child {node {Core-4-2-1}}
                child {node {Core-4-2-2}}
                }
            child {node {Core-4-3}
                child {node {Core-4-3-1}}
                child {node {Core-4-3-2}}
                }
            child {node {Core-4-4}
                }
            }   
          child[branch color=orange]{node[shading=ball] {Core-5}
            child {node {Core-5-1}
                child {node {Core-5-1-1}}
                }
            child {node {Core-5-2}
                child {node {Core-5-2-1}}
                child {node {Core-5-2-2}}
                }
            child {node {Core-5-3}
                child {node {Core-5-3-1}}
                child {node {Core-5-3-2}}
                }
            child {node {Core-5-4}
                }
            child {node {Core-5-5}
                }
            }   
        ;
    \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

In other cases one has to help manually

\documentclass[tikz,border=9]{standalone}
\usetikzlibrary{mindmap,decorations}
\makeatletter
\newcount\tikzcountchildi
\newcount\tikzcountchildii
\newcount\tikzcountchildiii
\newcount\tikzcountchildiv
\newcount\tikzcountchildv
\newcount\tikzcountchildvi
\tikzset{garlic growth/.style={growth function=\tikz@grow@garlic,
/tikz/mmap/name=#1,mmap/#1/.is family,
mmap/initialize counts,
execute at end scope={%
\tikz@mmap@store@aux{n-i}{\the\tikzcountchildi}%
\tikz@mmap@store@aux{n-ii}{\the\tikzcountchildii}%
\tikz@mmap@store@aux{n-iii}{\the\tikzcountchildiii}%
\tikz@mmap@store@aux{n-iv}{\the\tikzcountchildiv}%
\tikz@mmap@store@aux{n-v}{\the\tikzcountchildv}%
\tikz@mmap@store@aux{n-vi}{\the\tikzcountchildvi}}},
mmap/.cd,initialize counts/.code={\tikzcountchildi=0%
\tikzcountchildii=0%
\tikzcountchildiii=0%
\tikzcountchildiv=0%
\tikzcountchildv=0%
\tikzcountchildvi=0%
}
}
\def\tikz@mmap@store@aux#1#2{%
\immediate\write\@mainaux{\string\expandafter\xdef\noexpand\csname pgfk@/tikz/mmap/\pgfkeysvalueof{/tikz/mmap/name}/#1\string\endcsname{#2}}}%
\def\tikz@mmap@get@from@aux#1#2{%
\ifcsname pgfk@/tikz/mmap/\pgfkeysvalueof{/tikz/mmap/name}/#1\endcsname
\edef#2{\csname pgfk@/tikz/mmap/\pgfkeysvalueof{/tikz/mmap/name}/#1\endcsname}%
\else
\edef#2{0}%
\fi
}

\newcount\tikzcountgrandchild
\def\tikz@grow@garlic{%
  \pgfmathsetmacro{\pgfutil@tempa}{\pgfkeysvalueof{/tikz/mmap/overall rotation}}%
  \ifcase\tikztreelevel 
  \or
   \global\advance\tikzcountchildi by1\relax%
   \tikz@mmap@get@from@aux{n-i}{\myni}%
   \tikz@mmap@get@from@aux{n-ii}{\mynii}%
   \tikz@mmap@get@from@aux{n-1-\the\tikzcountchildi}{\mynall}%
   \tikz@mmap@get@from@aux{p-1-\the\tikzcountchildi}{\mypi}%
   \ifnum\mynii>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}%
        *(\pgfkeysvalueof{/tikz/mmap/child weight}*(\mypi)*360/\mynii+%
            (1-\pgfkeysvalueof{/tikz/mmap/child weight})*(\tikzcountchildi-1)*360/\myni)}%
   \fi
  \or
   \global\advance\tikzcountchildii by1\relax%
   \ifnum\tikznumberofcurrentchild=1\relax
    \tikz@mmap@store@aux{n-1-\the\tikzcountchildi}{\the\tikznumberofchildren}%
    \tikz@mmap@store@aux{p-1-\the\tikzcountchildi}{\the\numexpr\tikzcountchildii-1}%
   \fi   
   \tikz@mmap@get@from@aux{n-ii}{\mynii}%
   \tikz@mmap@get@from@aux{n-1-1}{\mynall}%
   \ifnum\mynii>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}%
    *(\tikzcountchildii-1-\mynall/2)*360/\mynii}%
   \fi
  \or
   \global\advance\tikzcountchildiii by1\relax%
   \ifnum\tikznumberofcurrentchild=1\relax
    \tikz@mmap@store@aux{n-1-\the\tikzcountchildi-\the\tikzcountchildii}{\the\tikznumberofchildren}%
    \tikz@mmap@store@aux{p-1-\the\tikzcountchildi-\the\tikzcountchildii}{\the\numexpr\tikzcountchildiii-1}%
   \fi   
   \tikz@mmap@get@from@aux{n-iii}{\myniii}%
   \ifnum\myniii>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}%
     *(\tikzcountchildiii-1)*360/\myniii}%
   \fi  
  \or
   \global\advance\tikzcountchildiv by1\relax%
   \tikz@mmap@get@from@aux{n-iv}{\myniv}%
   \ifnum\myniv>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}*(\tikzcountchildiv-1)*360/\myniv}%
   \fi  
  \or
   \tikz@mmap@get@from@aux{n-v}{\mynv}%
   \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+\pgfkeysvalueof{/tikz/mmap/sign}*(\tikzcountchildv-1)*360/\mynv}%
   \ifnum\mynv>0
    \global\advance\tikzcountchildv by1\relax%
   \fi
  \or
   \global\advance\tikzcountchildvi by1\relax%
   \tikz@mmap@get@from@aux{n-vi}{\mynvi}%
   \ifnum\myvi>0
    \pgfmathsetmacro{\pgfutil@tempa}{\pgfutil@tempa+(\tikzcountchildvi-1)*360/\mynvi}%
   \fi  
  \fi
  \pgftransformreset% 
  \pgftransformshift{\pgfpoint{\pgfkeysvalueof{/tikz/mmap/overall xshift}}%
        {\pgfkeysvalueof{/tikz/mmap/overall yshift}}}%
  \pgftransformrotate{\pgfutil@tempa}%
  \pgftransformxshift{\the\tikzleveldistance}%
}
\makeatother
\begin{document}
\tikzset{mmap/.cd,
    name/.initial=undef,
    overall rotation/.initial=0,
    overall xshift/.initial=0pt,
    overall yshift/.initial=0pt,
    sign/.initial=1,
    child weight/.initial=0.5,
    /tikz/.cd,
    Xshift/.style={xshift=#1,mmap/overall xshift=#1},
    Yshift/.style={yshift=#1,mmap/overall yshift=#1},
    branch color/.style={
        concept color=#1!60,
        every child/.append style={concept color=#1!30},
    }
}

\begin{tikzpicture}
    \begin{scope}[
            mindmap,garlic growth=A,mmap/child weight=0,
            mmap/overall rotation=-45,mmap/sign=1,
            nodes={concept,align=center, text width=2.5cm,inner sep=1mm},
            concept color=orange!60,
            level 1/.style={nodes={concept},
                every child/.append style={concept color=orange},
                level distance=5cm,
            },
            level 2/.style={%opacity=0,
                every child/.append style={concept color=blue},
                nodes={concept},
                level distance=10cm,
                minimum size=2.0cm
            },
            level 3/.style={%opacity=0,
                every child/.append style={concept color=green!70!black},
                level distance=5cm,sibling angle=40,
                minimum size=2.0cm,
            },
            level 4/.style={opacity=0,
                level distance=14cm,
                minimum size=2.0cm,text width=2.0cm
            }
        ]
        \node [root concept]{Dimension finie}
          child{node {EV de DF}% [clockwise from=0]
            child {node {L.\ Steinitz}
                [clockwise from=0]
                child {node {T.\ Base interm\'ediaire}
                child {node {T.\ Base incompl\`ete}}
                }
            child {node {P.\ Dim infinie}} 
            } 
          child {node {T.\ Dim de f.\ libres, g\'en\'eratrices, bonux 1}
              [clockwise from=-20]child{node{T.\ Bonux 2}}
                      }
          child {node {P.\ Dim d'un produit}}
          child {node {P.\ Grassmann}
            [clockwise from=10]
            child{node {P.\ Non g\'en\'eralisation de Grassmann}}
            child{node {P.\ Dim de sommes directes}
                child{node {P.\ Suppl\'ementaires}}
                child{node {T.\ Bonux 3 des suppl\'e.}} 
                }
            child{node {D.\ Le rang}
                child{node {P.\ sur le rang}}
                child{node {P.\ Rang, lib, g\'en, base}}
                }
            }
            }
        child{node {ALM}
            child{ node (equity) {Equity}
                [clockwise from=40]
                child { node {Indices}}
                child { node {Stocks}}
                child { node {ETFs}}
            }
            child{ node (commo) {Commodities}
                [clockwise from=70]
                child { node {Soft commo}}
                child { node {Precious}}
                child { node {Oil/Gas}}
            }
            child {node {Assurances}}
            child {node {Caisse de retraite}}
        }
        child{node {Directions financieres}
            child {node {Corporate}}
        }
        child{node {Instrument specialists} 
            child {node {Asset Managers traditionnels}}
            child {node {Hedge funds}}
            child {node {Trading desks form other banks}}
        }
        ;
    \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Here a new parameter was introduced, the child weight. In the above examples it is effectively set to 0.5. It determines how much the number of children influence the angle space allocated to a level 1 node. If it is 1, then impact is maximal, in this example it is 0.

So the overall summary is that some things work, and some don't, at least not fully automatically. However, I do not think one could expect an answer to solve the problems completely. What answers on this site can do is to contribute some incremental progress. Progress is more if someone provides a concrete idea (a specific algorithm, say) which one can build on. There are many possible modifications of the above one can explore. One particular promising one may be to marry the mindmap story to graph drawing algorithms (a quick search for that didn't yield results but of course I could have missed them), but this will be spared for future questions and answers.

  • I like this cooperative/iterative process between users. I played with your tricky code. I noticed that it often implies a little "twist" in the angles, not only on level 3 but also on level 2 and 1. For instance, on the mindmap (first part of your answer, with balls), on level 1 a 20(?) degree counterclockwise and a 20 (?) degree clockwise on level 2 would better organize the nodes. Shall we (I ?) start another question on TeX SE (or another SE) to gather information about the "graph drawing algorithms" that could sort automatically the placement of nodes? – JeT Apr 20 '20 at 11:37
  • 1
    @Julien-ElieTaieb Please feel free to ask a new question. All this code really does is to count the nodes at each level and to put them on a circle with equal angles between them. –  Apr 20 '20 at 12:19
  • I've just finished to compare your new with the previous one (https://tex.stackexchange.com/questions/532650/mindmaps-general-method-to-get-regular-harmonious-circle-shape-for-level-3-and) and the double compilation is super efficient! I work on the wording of the next question then. Merci cat ! – JeT Apr 20 '20 at 12:27
  • Strangely, child weight/.initial= 0, 1 or 0.5 has no impact, thought it wold correpond to the "offset level 3 angle" – JeT Apr 20 '20 at 13:05
  • 1
    @Julien-ElieTaieb The inner nodes should be impacted but it is not the offset level 3 angle. –  Apr 20 '20 at 13:08
  • cat Dunno if my new question (following this answer) summarizes the problem to have a fully automated way :) – JeT Apr 21 '20 at 23:18
  • Working on growing function to finalize my edit on another question, I tried the following \node [root concept]{} child foreach \A in {1,2,3,4}{
    node[] {\A} child foreach \B in {1,2,3}{ node[] { \A-\B} child foreach \C in {1,2}{ node { \A-\B-\C} child foreach \D in {1}{ node {\A-\B-\C-\D}
    % child foreach \E in {1}{ % node {} ` % } } } } };
    – JeT Apr 22 '20 at 11:20
  • 1- With a 4-level map, it works as planned (with the twist effect) but i get an error dimension too large when i populate the 4th level with with more than 1 final node. child foreach \D in {1,2} 2- When I try a level5 one, there is an error I dont' get regarding a division by 0 on level 5 (in comment) 3 - child weight/.initial= 0, 1 or 0.5 has no impact I can see. – JeT Apr 22 '20 at 11:21
  • 1
    @Julien-ElieTaieb Sorry to hear about the dimension too large errors. They can happen because TeX only allows a certain maximum dimension. I will not change this answer for now. The OP did not give any feedback, let alone accept it. –  Apr 22 '20 at 16:05
  • Merci for the exaplantions @Schrodinger's cat. I edited my question related to this one. – JeT Apr 22 '20 at 16:09