3

I'm making a mindmap in my beamer presentation. The mindmap either disregards grow cyclic and everything goes to the right/east of the mindmap, or the siblings always align eastward, rather than growing cyclic, similar to a tree.

I'd like my mindmap to look a little like this:

enter image description here

Instead, the output (from the code below) looks like this:

enter image description here

\documentclass{beamer}
\usepackage{xcolor}

\usepackage{tikz}
\usetikzlibrary{mindmap}
\tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
    }
}

\makeatletter
\tikzoption{myball color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-left color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-left}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-right color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-right}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-lefttop color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-lefttop}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-righttop color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-righttop}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-top color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-top}\tikz@addmode{\tikz@mode@shadetrue}}
\pgfdeclareradialshading[tikz@ball]{myball}{\pgfqpoint{5bp}{10bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(9bp)=(tikz@ball!75!white);
 color(18bp)=(tikz@ball!90!black);
 color(25bp)=(tikz@ball!70!black);
 color(50bp)=(black)}
 \pgfdeclareradialshading[tikz@ball]{myball-left}{\pgfqpoint{5bp}{-9bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)}
\pgfdeclareradialshading[tikz@ball]{myball-right}{\pgfqpoint{-5bp}{-9bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)} 
 \pgfdeclareradialshading[tikz@ball]{myball-lefttop}{\pgfqpoint{3bp}{7bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)}
\pgfdeclareradialshading[tikz@ball]{myball-righttop}{\pgfqpoint{-3bp}{7bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)} 
\pgfdeclareradialshading[tikz@ball]{myball-top}{\pgfqpoint{0bp}{11bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)} 
\makeatother
\tikzset{level 1 concept/.append style={font=\sf, level distance = 25mm,sibling angle=60}}
\tikzset{level 2 concept/.append style={font=\sf, level distance = 18mm,sibling angle=40}}
\tikzset{level 3 concept/.append style={font=\sf, level distance = 14mm,sibling angle=30}}
\tikzset{mynode/.style={scale=.25}}


\begin{document}
\begin{frame}{}
\centering
\begin{tikzpicture}[mindmap, concept color=red, font=\sf\bf, text=white,scale=0.6, grow cyclic]
\node[concept,mynode,circle,shading=myball,visible on=<1->]{Circulair economie}[clockwise from=45]
    child [sibling angle=250, concept color=orange,visible on=<10->] {node[mynode,circle, myball-top color=orange] (c1){21ste eeuwse verlichting}                                
        child[visible on=<11->]  {node [mynode,circle, myball-left color=orange](c11){Lineaire systemen}}
        child[visible on=<11->]  {node [mynode,circle,myball-left color=orange](c12){Non-lineaire systemen}}
        child[visible on=<11->]  {node [mynode,circle,myball-left color=orange](c13){Inspiratie biosfeer}}                                                   
        child[visible on=<11->]  {node [mynode,circle,myball-left color=orange](c14){Systeemdenken}}
     }
     child [concept color=violet,visible on=<2->]{node [mynode,circle,myball-righttop color=violet, sibling angle=250](c2){Life, Design, Intention}
        child[visible on=<3->] {node [mynode,circle,myball-right color=violet](c21){Biologische cycli}}
        child[visible on=<3->] {node [mynode,circle,myball-right color=violet](c22){Technische cycli}}
        child[visible on=<3->] {node [mynode,circle,myball-right color=violet](c23){Cradle-to-Cradle}}
        child[visible on=<3->] {node [mynode,circle,myball-right color=violet](c24){Whole-systems}}
    }
    child [concept color=blue,visible on=<4->]{node [mynode,circle,myball-right color=violet, clockwise from=250](c3){Energie, materialen}
        child[visible on=<5->] {node [mynode,circle,myball-right color=violet](c31){Energietrends}}
        child[visible on=<5->] {node [mynode,circle,myball-right color=violet](c32){Energie \& Voedsel}}
        child[visible on=<5->] {node [mynode,circle,myball-right color=violet](c33){Slimmere distributie energie}}
        child[visible on=<5->] {node [mynode,circle,myball-right color=violet](c34){Veerkrachtigheid versus efficiëntie}}
        child[visible on=<5->] {node [mynode,circle,myball-right color=violet](c35){Cascading}}
    }
    child [concept color=red,visible on=<6->]{node [mynode,circle,myball-left color=violet](c4){Producten en services}
        child[visible on=<7->] {node [mynode,circle,myball-right color=violet](c41){Circulair design}}
        child[visible on=<7->] {node [mynode,circle,myball-right color=violet](c42){Gebruiker versus consument}}
        child[visible on=<7->] {node [mynode,circle,myball-right color=violet](c43){Design for disassembly}}
        child[visible on=<7->] {node [mynode,circle,myball-right color=violet](c44){Circular financing}}
    }
    child [concept color=yellow,visible on=<8->]{node [mynode,circle,myball-lefttop color=violet](c5){Prijssystemen}
        child[visible on=<9->] {node [mynode,circle,myball-right color=violet](c51){Geld versus goed}}
        child[visible on=<9->] {node [mynode,circle,myball-right color=violet](c52){Belasting en subsidies}}
        child[visible on=<9->] {node [mynode,circle,myball-right color=violet](c53){Welzijn en groei}}
    };
\end{tikzpicture}
\end{frame}

\end{document}
  • It's a confused mind. – percusse Sep 18 '14 at 14:31
  • I find that if I use anything to specify the growth manually, after that point, it applies everywhere. So I think [clockwise from=45] and [sibling angle=250], for example, effectively override the effect of grow cyclic. Try taking them out just to see if that helps as an experiment. – cfr Sep 18 '14 at 14:38
3

A complete solution. There are many clockwise from=xx needs to be removed. Further, individual sibling angle=xx is removed and is replaced by automatic allocation of level 1 siblings via

sibling angle=360/\the\tikznumberofchildren

so that the level 1 siblings are evenly allocated.

enter image description here enter image description here enter image description here

Code

\documentclass{beamer}
\usepackage{xcolor}

\usepackage{tikz}
\usetikzlibrary{mindmap,calc}
\tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt=#1{}{invisible}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
    },
}

\makeatletter
\tikzoption{myball color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-left color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-left}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-right color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-right}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-lefttop color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-lefttop}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-righttop color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-righttop}\tikz@addmode{\tikz@mode@shadetrue}}
\tikzoption{myball-top color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{myball-top}\tikz@addmode{\tikz@mode@shadetrue}}
\pgfdeclareradialshading[tikz@ball]{myball}{\pgfqpoint{5bp}{10bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(9bp)=(tikz@ball!75!white);
 color(18bp)=(tikz@ball!90!black);
 color(25bp)=(tikz@ball!70!black);
 color(50bp)=(black)}
 \pgfdeclareradialshading[tikz@ball]{myball-left}{\pgfqpoint{5bp}{-9bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)}
\pgfdeclareradialshading[tikz@ball]{myball-right}{\pgfqpoint{-5bp}{-9bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)} 
 \pgfdeclareradialshading[tikz@ball]{myball-lefttop}{\pgfqpoint{3bp}{7bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)}
\pgfdeclareradialshading[tikz@ball]{myball-righttop}{\pgfqpoint{-3bp}{7bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)} 
\pgfdeclareradialshading[tikz@ball]{myball-top}{\pgfqpoint{0bp}{11bp}}{%
 color(0bp)=(tikz@ball!30!white);
 color(15bp)=(tikz@ball!75!white);
 color(25bp)=(tikz@ball!90!black);
 color(40bp)=(tikz@ball!70!black);
 color(70bp)=(black)} 
\makeatother
\tikzset{level 1 concept/.append style={font=\sf, level distance = 25mm,sibling angle=360/\the\tikznumberofchildren}}
\tikzset{level 2 concept/.append style={font=\sf, level distance = 18mm,sibling angle=40}}
\tikzset{level 3 concept/.append style={font=\sf, level distance = 14mm,sibling angle=30}}
\tikzset{mynode/.style={scale=.25}}


\begin{document}
\begin{frame}{}
\centering
\begin{tikzpicture}[mindmap, concept color=red, font=\sf\bf, text=white,scale=0.6, grow cyclic
]
\node[concept,mynode,circle,shading=myball,visible on=<1->
]{Circulair economie}[]%clockwise from=45]
    child [concept color=orange,visible on=<10->
] {node[mynode,circle, myball-top color=orange] (c1){21ste eeuwse verlichting}                                
        child[visible on=<11->
]  {node [mynode,circle, myball-left color=orange](c11){Lineaire systemen}}
        child[visible on=<11->
]  {node [mynode,circle,myball-left color=orange](c12){Non-lineaire systemen}}
        child[visible on=<11->
]  {node [mynode,circle,myball-left color=orange](c13){Inspiratie biosfeer}}                                                   
        child[visible on=<11->
]  {node [mynode,circle,myball-left color=orange](c14){Systeemdenken}}
     }
     child [concept color=violet,visible on=<2->
]{node [mynode,circle,myball-righttop color=violet](c2){Life, Design, Intention}
        child[visible on=<3->
] {node [mynode,circle,myball-right color=violet](c21){Biologische cycli}}
        child[visible on=<3->
] {node [mynode,circle,myball-right color=violet](c22){Technische cycli}}
        child[visible on=<3->
] {node [mynode,circle,myball-right color=violet](c23){Cradle-to-Cradle}}
        child[visible on=<3->
] {node [mynode,circle,myball-right color=violet](c24){Whole-systems}}
    }  % ----------------
    child [concept color=blue,visible on=<4->
]{node [mynode,circle,myball-right color=violet](c3){Energie, materialen}
        child[visible on=<5->
] {node [mynode,circle,myball-right color=violet](c31){Energietrends}}
        child[visible on=<5->
] {node [mynode,circle,myball-right color=violet](c32){Energie \& Voedsel}}
        child[visible on=<5->
] {node [mynode,circle,myball-right color=violet](c33){Slimmere distributie energie}}
        child[visible on=<5->
] {node [mynode,circle,myball-right color=violet](c34){Veerkrachtigheid versus efficiëntie}}
        child[visible on=<5->
] {node [mynode,circle,myball-right color=violet](c35){Cascading}}
    }   %----------
    child [concept color=red,visible on=<6->
]{node [mynode,circle,myball-left color=violet](c4){Producten en services}
        child[visible on=<7->
] {node [mynode,circle,myball-right color=violet](c41){Circulair design}}
        child[visible on=<7->
] {node [mynode,circle,myball-right color=violet](c42){Gebruiker versus consument}}
        child[visible on=<7->
] {node [mynode,circle,myball-right color=violet](c43){Design for disassembly}}
        child[visible on=<7->
] {node [mynode,circle,myball-right color=violet](c44){Circular financing}}
    }
    child [concept color=yellow,visible on=<8->
]{node [mynode,circle,myball-lefttop color=violet](c5){Prijssystemen}
        child[visible on=<9->
] {node [mynode,circle,myball-right color=violet](c51){Geld versus goed}}
        child[visible on=<9->
] {node [mynode,circle,myball-right color=violet](c52){Belasting en subsidies}}
        child[visible on=<9->
] {node [mynode,circle,myball-right color=violet](c53){Welzijn en groei}}
};
\end{tikzpicture}
\end{frame}

\end{document}
  • (+1) for sibling angle=360/\the\tikznumberofchildren. I'm wondering why that isn't default... – cfr Sep 18 '14 at 23:06
  • 1
    Thanks for the encouragement. Actually, I used it once before when working on my project and thus vividly knew that I should use the formula here when seeing the overlapping siblings. Well, my instinct response to your wonders is that for a two-sibling case a horizontal structure (if devaulted) takes more spaces than needed. – Jesse Sep 19 '14 at 0:42
2

Just removing [clockwise from=45] will solve the main problem:

better behaved mindmap

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.