Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to have two mindmaps that share children? This is what I would like to have:

Concept 1 is blue, and has some children. Concept 2 is red, and has some children. Concept 1 and two share one child, which is purple.

And this is what I have so far: Concept 1 is blue, and has some children. Concept 2 is blue, and has some children.

\begin{tikzpicture}[small mindmap,concept color=blue!80]
  \node [concept] {Root concept 1}
    child[clockwise from=270] {node[concept] {child}}
    child[clockwise from=270] {node[concept] {child}};
  \node [concept] at (5,0) {Root concept 2}
    child[clockwise from=225] {node[concept] {child}}
    child[grow=0 ] {node[concept] {child}};
\end{tikzpicture} 
share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

You could use a scope for the color, and opacity, and a bit manual positioning of the root nodes, such as:

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{figure}
\begin{tikzpicture}[small mindmap,concept color=blue!80]
  \node [concept] {Root concept 1}
    child[clockwise from=0] {node[concept] {child}}
    child[clockwise from=270] {node[concept] {child}};
  \begin{scope}[concept color=red!80]
    \node [concept] at (5.6,0) {Root concept 2}
      child[clockwise from=180] {node[concept,opacity=0.5] {child}}
      child[grow=230 ] {node[concept] {child}}
      child[grow=270 ] {node[concept] {child}};
  \end{scope}
\end{tikzpicture} 
\end{figure}
\end{document}

mindmap

share|improve this answer
add comment

You could use the circle connection bar path as explained in section 39.4.3 of the Tikz manual in combination with the scoping trick by @Stefan, like so:

\begin{tikzpicture}[small mindmap,concept color=blue!80]
  \node (n1) [concept] {Root concept 1}
    child[clockwise from=270] {node[concept] {child}}
    child[clockwise from=270] {node[concept] {child}};
  \begin{scope}[concept color=red]
    \node (n2) [concept] at (5,0) {Root concept 2}
      child[clockwise from=225] {node[concept, concept color=magenta] (c1) {child}}
      child[grow=0 ] {node[concept] {child}};
  \end{scope}

 \path (n1) to [circle connection bar switch color=from (blue!80) to (magenta)] (c1);
\end{tikzpicture}

This results in:

enter image description here

The connection between Root Concept 2 and the shared child can be made a gradient too, or you can just change switch color to color.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.