1

I tried to group the children nodes around a parent with different distances between them, depending on how they are written they form three groups.

For example seeing it as a clock, I would like to have CHILD A, CHILD B and CHILD C at 2:00, 3:00 and 4:00, child I and child II at 7:00 and 8:00 and Child 1 and Child 2 at 10:00 and 11:00.

However I seem unable to to figure out, how the angle option here works. Would appreciate any help! The code that I have so far

\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage[outline]{contour}

\begin{document}

%\contourlength{0.3pt}

\usetikzlibrary{mindmap,trees}

\begin{tikzpicture}
  \path[mindmap,concept color=blue!80!black,text=white,
  level 1 concept/.append style=
      {every child/.style={concept color=blue!50},minimum size=2.5cm,sibling angle=30}]
    node[concept,inner sep=0pt,minimum size=3cm](ojamedian)at (-3,0) {Parent}
    [clockwise from=0]{
      child[sibling angle=30] { node[concept] {CHILD A}}
      child[sibling angle=30] { node[concept] {CHILD B}}
      child[sibling angle=30] { node[concept] {CHILD C}}
      child[sibling angle=50] { node[concept] {child I}}
      child[sibling angle=30] { node[concept] {child II} }
      child[sibling angle=50] { node[concept] {Child 1} }
      child[sibling angle=167] { node[concept] {Child 2} }
    }
    ;
\end{tikzpicture}


\end{document}

1 Answer 1

4

I think it is easier to use grow here. Note that 0 is at 3 o'clock and not high noon here.

\documentclass[border=10pt,tikz,multi]{standalone}
\begin{document}
\usetikzlibrary{mindmap,trees}
\begin{tikzpicture}
  \path[mindmap,concept color=blue!80!black,text=white, level 1 concept/.append style= {every child/.style={concept color=blue!50},minimum size=2.5cm}]
  node[concept,inner sep=0pt,minimum size=3cm](ojamedian)at (-3,0) {Parent}
  {
    child [grow=30] { node[concept] {CHILD A}}
    child [grow=0] { node[concept] {CHILD B}}
    child [grow=-30] { node[concept] {CHILD C}}
    child [grow=-120] { node[concept] {child I}}
    child [grow=-150] { node[concept] {child II} }
    child [grow=150] { node[concept] {Child 1} }
    child [grow=120] { node[concept] {Child 2} }
  }
  ;
\end{tikzpicture}
\end{document}

growing map

2
  • Great, thanks, exactly what I was looking for. Haven't known the differences between sibling and grow. Apr 25, 2016 at 17:08
  • @DanielFischer I don't find it always intuitive and have found experimenting and seeing more effective than anything else ;).
    – cfr
    Apr 25, 2016 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .