15

Following Sigur's suggestion in a comment I increased the level distances so that the node separation looks reasonable, but the image I get is still weird (the transitions continue to have an undesired orange color):

enter image description here

Expected result would be more like this: enter image description here

MWE (from https://www.sharelatex.com/blog/2013/09/04/tikz-series-pt5.html, and my example is compiled on sharelatex at https://www.sharelatex.com/project/52d47f206202b37430000733).

\documentclass[article, a4paper, 12pt, oneside]{memoir}

\usepackage{tikz}
\usetikzlibrary{mindmap}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[grow cyclic, text width=2cm, align=flush center, every node/.style=concept, concept color=orange!40,
level 1/.style={level distance=6cm,sibling angle=90},
level 2/.style={level distance=4cm,sibling angle=45}]

\node{ShareLaTeX Tutorial Videos}
   child [concept color=blue!30] { node {Beginners Series}
        child { node {First Document}}
        child { node {Sections and Paragraphs}}
        child { node {Mathematics}}
        child { node {Images}}
        child { node {bibliography}}
        child { node {Tables and Matrices}}
        child { node {Longer Documents}}
    }
    child [concept color=yellow!30] { node {Thesis Series}
        child { node {Basic Structure}}
        child { node {Page Layout}}
        child { node {Figures, Subfigures and Tables}}
        child { node {Biblatex}}
        child { node {Title Page}}
    }
    child [concept color=teal!40]  { node {Beamer Series}
        child { node {Getting Started}}
        child { node {Text, Pictures and Tables}}
        child { node {Blocks, Code and Hyperlinks}}
        child { node {Overlay Specifications}}
        child { node {Themes and Handouts}}
    }
    child [concept color=purple!50] { node {TikZ Series}
        child { node {Basic Drawing}}
        child { node {Geogebra}}
        child { node {Flow Charts}}
        child { node {Circuit Diagrams}}
        child [concept color=green!40]  { node {Mind Maps}}
    };

\end{tikzpicture}
\end{document}
  • 1
    What exactly is your question? – Sean Allred Jan 14 '14 at 0:25
  • 1
    Try to increase the level distance for levels 1 and 2 style. I tested with 6 and 4 cm. It is nice. Also, use standalone class to make a full page picture. – Sigur Jan 14 '14 at 0:26
  • Are you talking about the problem with color transitions? – Sigur Jan 14 '14 at 0:32
  • yes, is this a known issue? – Joe Corneli Jan 14 '14 at 0:34
  • 1
    MWE and image updated w/ your suggestion Sigur, thanks. – Joe Corneli Jan 14 '14 at 0:41
19

The reason that the transition colors are "wrong" is because you did not use the mindmap optional argument to the tikzpicture environment.

Here is how I found the problem, by playing with a minimal example to try to understand what went wrong. The following example is based on the example in chapter 6 of the PGF/TikZ manual version 3.0.0.


Without mindmap optional argument:

\documentclass[margin=2mm]{standalone}

\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}
\begin{tikzpicture}[
    %mindmap,                   %% NOTE: mindmap optional argument commented out!
    every node/.style=concept,
    concept color=black!20,
    grow cyclic,
    level 1/.append style={level distance=4.5cm,sibling angle=90},
    level 2/.append style={level distance=3cm,sibling angle=45}
    ]
  \node [root concept] {Computational Complexity} % root
    child [concept color=red] { node {Computational Problems}
      child { node {Problem Measures} } 
      child { node {Problem Aspects} }
    }
    child [concept color=blue] { node {Computational Models}
      child { node {Turing Machines} }
      child { node {Random-Access Machines} }
    };
\end{tikzpicture}
\end{document}

enter image description here


With mindmap optional argument:

\documentclass[margin=2mm]{standalone}

\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}
\begin{tikzpicture}[
    mindmap,
    every node/.style=concept,
    concept color=black!20,
    grow cyclic,
    level 1/.append style={level distance=4.5cm,sibling angle=90},
    level 2/.append style={level distance=3cm,sibling angle=45}
    ]
  \node [root concept] {Computational Complexity} % root
    child [concept color=red] { node {Computational Problems}
      child { node {Problem Measures} } 
      child { node {Problem Aspects} }
    }
    child [concept color=blue] { node {Computational Models}
      child { node {Turing Machines} }
      child { node {Random-Access Machines} }
    };
\end{tikzpicture}
\end{document}

enter image description here


Fixed mindmap:

I needed to increase the dimensions of the paper, increase the level distances to make the circles not overlap, and increase the text width to improve the text alignment.

\documentclass[article, 12pt, oneside]{memoir}

\usepackage[a2paper]{geometry}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[
    mindmap,
    grow cyclic, text width=4cm, align=flush center,
    every node/.style={concept},
    concept color=orange!40,
    level 1/.style={level distance=10cm,sibling angle=90},
    level 2/.style={level distance=6cm,sibling angle=45}]

\node [root concept] {ShareLaTeX Tutorial Videos}
   child [concept color=blue!30] { node {Beginners Series}
        child { node {First Document}}
        child { node {Sections and Paragraphs}}
        child { node {Mathematics}}
        child { node {Images}}
        child { node {bibliography}}
        child { node {Tables and Matrices}}
        child { node {Longer Documents}}
    }
    child [concept color=yellow!30] { node {Thesis Series}
        child { node {Basic Structure}}
        child { node {Page Layout}}
        child { node {Figures, Subfigures and Tables}}
        child { node {Biblatex}}
        child { node {Title Page}}
    }
    child [concept color=teal!40]  { node {Beamer Series}
        child { node {Getting Started}}
        child { node {Text, Pictures and Tables}}
        child { node {Blocks, Code and Hyperlinks}}
        child { node {Overlay Specifications}}
        child { node {Themes and Handouts}}
    }
    child [concept color=purple!50] { node {TikZ Series}
        child { node {Basic Drawing}}
        child { node {Geogebra}}
        child { node {Flow Charts}}
        child { node {Circuit Diagrams}}
        child [concept color=green!40]  { node {Mind Maps}}
    };
\end{tikzpicture}
\end{document}

enter image description here

2

Just increment the appropriate keys:

\documentclass[article, a4paper, 12pt, oneside]{memoir}

\usepackage{tikz}
\usetikzlibrary{mindmap}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[grow cyclic, text width=2cm, align=flush center, every node/.style=concept, concept color=orange!40,
level 1/.style={level distance=7cm,sibling angle=90},
level 2/.style={level distance=4cm,sibling angle=45}]

\node{ShareLaTeX Tutorial Videos}
   child [concept color=blue!30] { node {Beginners Series}
        child { node {First Document}}
        child { node {Sections and Paragraphs}}
        child { node {Mathematics}}
        child { node {Images}}
        child { node {bibliography}}
        child { node {Tables and Matrices}}
        child { node {Longer Documents}}
    }
    child [concept color=yellow!30] { node {Thesis Series}
        child { node {Basic Structure}}
        child { node {Page Layout}}
        child { node {Figures, Subfigures and Tables}}
        child { node {Biblatex}}
        child { node {Title Page}}
    }
    child [concept color=teal!40]  { node {Beamer Series}
        child { node {Getting Started}}
        child { node {Text, Pictures and Tables}}
        child { node {Blocks, Code and Hyperlinks}}
        child { node {Overlay Specifications}}
        child { node {Themes and Handouts}}
    }
    child [concept color=purple!50] { node {TikZ Series}
        child { node {Basic Drawing}}
        child { node {Geogebra}}
        child { node {Flow Charts}}
        child { node {Circuit Diagrams}}
        child [concept color=green!40]  { node {Mind Maps}}
    };

\end{tikzpicture}
\end{document}

enter image description here

  • 2
    that still doesn't look like the desired result... I just uploaded the same thing in my answer :-) – Joe Corneli Jan 14 '14 at 0:36

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.