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.

Hi I would like to mark certain nodes of tikz-mindmap just an example is illustrated in the figure.

Thanks in advanceenter image description here

The minimal working code is here


\documentclass[]{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{tikzpagenodes}
\usepackage{graphicx}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.text}
\tikzset{>=latex}
\usetikzlibrary{mindmap,trees,shadows}
\usetikzlibrary{decorations.text}
\usetikzlibrary{shapes.multipart}
\usepgfplotslibrary{patchplots}
\pgfplotsset{compat=1.8}
\begin{document}
\definecolor{CIR}{RGB}{255,0,35}
\definecolor{PN}{RGB}{97,189,64}
\definecolor{CFO}{RGB}{92,219,101}
\definecolor{DCO}{RGB}{255,131,211}
\definecolor{AN}{RGB}{72,163,235}
\definecolor{IQ}{RGB}{234,193,137} %253,224,158
\definecolor{IQTx}{RGB}{255,173,45} %241,88,21
\definecolor{IQRx}{RGB}{216,182,145}
\definecolor{IQFs}{RGB}{252,221,153}%206,165,75
\definecolor{IQFi}{RGB}{252,218,23}
\definecolor{baige}{RGB}{226,230,156}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}

\begin{figure}[H]
\begin{center}
\begin{tikzpicture}[very thick, scale=0.8,
 every node/.style={scale=0.8},
 decoration={start radius=1cm, end radius=.15cm,amplitude=2mm,angle=30},
 outer sep=1pt
  ]
  \path[mindmap,concept color=red,text=white]
    node[concept] {\bf Root}
    [clockwise from=0]
    child[concept color=IQ] {
      node[concept] {\textcolor{white}{\bf A}}
      [clockwise from=120]
      child [concept color=IQTx,text=white] { node[concept] {{\bf A1}} }
      child [concept color=IQRx,text=white] { node[concept] {{\bf A2} }  }
      child [concept color=IQFs,text=white] { node[concept] {{\bf A3} }  }
      child [concept color=IQFi,text=white]{ node[concept] {\bf A4} }
      }  
        child[concept color=DCO, grow=75, level distance=4.5cm,text=white ] {node[concept] {\bf B} }
child[concept color=PN, grow=150,level distance=4.5cm,text=white] { node[concept] {\bf C} } 
child[concept color=CFO, grow=215, level distance=4.5cm,text=white] { node[concept] {\bf D} }
child[concept color=AN, grow=290, level distance=4.5cm,text=white] { node[concept] {\bf E} };
\end{tikzpicture}
\caption{Mindmap Problem}
\label{fig:mindmap}
\end{center}
\end{figure}
\end{document}

Any help would be much appreciated.

Muhammad Ali

share|improve this question
5  
To the person who downvoted this: Please make sure that you give the person who's asking a question a chance to improve their post, by leaving a comment explaining why you downvoted and how you think the question can be improved. Please also don't forget to come back and revert the down vote once the question has been improved. Finally, please note that on this site, down votes are typically reserved for exceptionally bad questions (i.e. spam). –  Jake Nov 20 '13 at 12:36
    
Just a suggestion because I don't know nothing about TiKZ mindmaps so I don't know if it has sense but you could try to draw a similar mindmap with larger concepts (the ones with border) on background layer. –  Ignasi Nov 20 '13 at 15:38

1 Answer 1

Next code shows a possibility. It consists in drawing a bigger mindmap on background layer. In this case it has been easy because you already used every node/.style={scale=0.8}, so changing it to scale=0.85 everything grown up. Concepts with border are drawn in black (or whatever color you prefer for border) and the other ones are drawn in white (or whatever color you use for your background).

I admit it's not the best solution, but it works.

\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{mindmap,backgrounds}
\begin{document}
\definecolor{PN}{RGB}{97,189,64}
\definecolor{CFO}{RGB}{92,219,101}
\definecolor{DCO}{RGB}{255,131,211}
\definecolor{AN}{RGB}{72,163,235}
\definecolor{IQ}{RGB}{234,193,137} 
\definecolor{IQTx}{RGB}{255,173,45} 
\definecolor{IQRx}{RGB}{216,182,145}
\definecolor{IQFs}{RGB}{252,221,153}
\definecolor{IQFi}{RGB}{252,218,23}

\begin{tikzpicture}[very thick, scale=0.8,
 every node/.style={scale=0.8},
 outer sep=1pt
  ]
  \path[mindmap,concept color=red,text=white]
    node[concept] {\bf Root}
    [clockwise from=0]
    child[concept color=IQ] {
      node[concept] {\textcolor{white}{\bf A}}
      [clockwise from=120]
      child [concept color=IQTx,text=white] {node[concept] {{\bf A1}}}
      child [concept color=IQRx,text=white] {node[concept] {{\bf A2}}}
      child [concept color=IQFs,text=white] {node[concept] {{\bf A3}}}
      child [concept color=IQFi,text=white] {node[concept] {\bf A4}}
      }  
    child [concept color=DCO, grow=75, level distance=4.5cm, text=white] 
          {node[concept] {\bf B}}
    child [concept color=PN, grow=150, level distance=4.5cm, text=white] 
          {node[concept] {\bf C}} 
    child [concept color=CFO, grow=215, level distance=4.5cm, text=white] 
          {node[concept] {\bf D}}
    child [concept color=AN, grow=290, level distance=4.5cm, text=white] 
          {node[concept] {\bf E}};

\begin{scope}[on background layer, every node/.style={scale=.85}]
  \path[mindmap,concept color=black,text=black]
    node[concept] {\bf Root}
    [clockwise from=0]
    child[concept color=black] {
      node[concept] {\textcolor{white}{\bf A}}
      [clockwise from=120]
      child [concept color=black,text=black] {node[concept] {{\bf A1}}}
      child [concept color=black,text=black] {node[concept] {{\bf A2}}}
      child [concept color=white,text=white] {node[concept] {{\bf A3}}}
      child [concept color=black,text=black] {node[concept] {\bf A4}}
      }  
      child [concept color=white, grow=75, level distance=4.5cm, text=white] 
            {node[concept] {\bf B}}
      child [concept color=white, grow=150, level distance=4.5cm, text=white] 
            {node[concept] {\bf C}} 
      child [concept color=black, grow=215, level distance=4.5cm, text=black] 
            {node[concept] {\bf D}}
      child [concept color=white, grow=290, level distance=4.5cm, text=white] 
            {node[concept] {\bf E}};
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Update:

A simpler solution consists in adding a general shadow (or a preaction) to highlighted concepts. I don't know how to apply it to concepts connections.

\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{mindmap,shadows}
\begin{document}
\definecolor{PN}{RGB}{97,189,64}
\definecolor{CFO}{RGB}{92,219,101}
\definecolor{DCO}{RGB}{255,131,211}
\definecolor{AN}{RGB}{72,163,235}
\definecolor{IQ}{RGB}{234,193,137} 
\definecolor{IQTx}{RGB}{255,173,45} 
\definecolor{IQRx}{RGB}{216,182,145}
\definecolor{IQFs}{RGB}{252,221,153}
\definecolor{IQFi}{RGB}{252,218,23}

\begin{tikzpicture}[very thick, scale=0.8,
 every concept/.style={scale=.8, font=\bfseries, text=white},
 marca/.append style={general shadow={fill=black,shadow scale=1.07}},
 outer sep=1pt,
  ]
  \path[mindmap,concept color=red]
    node[concept, marca] {\bf Root}
    [clockwise from=0]
    child[concept color=IQ] {
      node[concept, marca] {\bf A}
      [clockwise from=120]
        child [concept color=IQTx] {node[concept, marca] {A1}}
        child [concept color=IQRx] {node[concept, marca] {A2}}
        child [concept color=IQFs] {node[concept] {A3}}
        child [concept color=IQFi] {node[concept, marca] {A4}}}  
    child [concept color=DCO, grow=75, level distance=4.5cm] {node[concept] {B}}
    child [concept color=PN, grow=150, level distance=4.5cm] {node[concept] {C}} 
    child[concept color=CFO, grow=215, level distance=4.5cm] {node[concept, marca] {D}}
    child[concept color=AN, grow=290, level distance=4.5cm] {node[concept] {E}};
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer

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.