1

I would like to fit all text into nodes to my mindmap diagram

enter image description here

I have tried with "text width" but I do want different sizes for nodes (depending on parent/children relationship). Also would like to change my font to a different weight.

    documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\tikzset{
    every node/.append style={concept, rectangle, minimum size=0.5cm, inner sep=0.2mm}
}

\begin{document}
\begin{center}


\tikz[mindmap,concept color=blue!70]
\node [concept] {Wind turbine Monitoring}
child[grow=30,concept color=blue!50] {
    node[concept] {Blades}
    [clockwise from=0]
    child[grow=30] {node[concept] {Vbrations}}
    child[grow=150] {node[concept] {Loads:Bending Moments}} 
    }
child[grow=150,concept color=blue!70] {
    node[concept] {Tower}
    [clockwise from=0]
    child[grow=30,concept color=blue!50] {node[concept] {Bending Moments}}
    child[grow=150] {node[concept] {Oscillations}}
    }
child[grow=270] {
    node[concept] {Drive Train}
    [clockwise from=0]
    child[grow=-90] {
    node[concept] {Vibration}
    child[grow=-90] {node[concept] {acceleration}}
    }
    child[grow=150,concept color=blue!50] {
        node[concept] {Loads}
        [clockwise from=0]
        child[grow=-150,concept color=blue!50] {node[concept]                       {Fatigue}}
        }
    child[grow=30,concept color=blue!50] {node[concept] {Oil                    Particles}}
    }
;
\end{center}
\end{document}

At the end I would like to use this picture to a *.ppt presentation so the size of nodes and text is important to me. Thanks a lot.

  • Is adding different text widths for different nodes out of the question? To change font properties for a node use e.g. font=\bfseries in a style/node options, or use \textbf{...} directly in the node. And unrelated: why have concept in every node/.append style, the options to the \tikz-picture and as an option to each individual node? One of the three is likely enough ... – Torbjørn T. Sep 11 '17 at 10:04
  • The point is that I want to clarify that the size of nodes depending on their level. But we could manually change the node width though. – JPV Sep 11 '17 at 10:10
1

You can change the style according to level with the level N concept styles, as described in the manual, section 58.2. (N is an integer, counting from 1.)

\documentclass[border=2mm]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}[
  mindmap,
  concept color=blue!70,
  every node/.append style={concept,inner sep=0.2mm},
  level 1 concept/.append style={text width=2.5cm,font=\small},
  level 2 concept/.append style={text width=2cm,font=\scriptsize},
  level 3 concept/.append style={text width=1cm,font=\tiny\bfseries},
]
\node {Wind turbine Monitoring}
child[grow=30,concept color=blue!50] {
    node {Blades}
    [clockwise from=0]
    child[grow=30] {node {Vibrations}}
    child[grow=150] {node {Loads: Bending Moments}} 
    }
child[grow=150,concept color=blue!70] {
    node {Tower}
    [clockwise from=0]
    child[grow=30,concept color=blue!50] {node {Bending Moments}}
    child[grow=150] {node {Oscillations}}
    }
child[grow=270] {
    node {Drive Train}
    [clockwise from=0]
    child[grow=-90] {
    node {Vibration}
    child[grow=-90] {node {accel\-eration}} % note \- to indicate hyphenation point
    }
    child[grow=150,concept color=blue!50] {
        node {Loads}
        [clockwise from=0]
        child[grow=-150,concept color=blue!50] {node  {Fatigue}}
        }
    child[grow=30,concept color=blue!50] {node {Oil Particles}}
    }
;
\end{tikzpicture}
\end{document}

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.