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.

I'm trying to grey out edges of a graph to high a region of interest. For instance, I would like to make every edge expect for that labeled "interest" grey in the following MWE.

\usefonttheme{serif}
\usepackage{tikz}
\usetikzlibrary{arrows}
\definecolor{burntorange}{cmyk}{0,0.52,1,0}

\begin{document}

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
 thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]

  \node[main node, scale=1.4] (interest) {$i$};
  \node[main node, fill=blue!10] (j) [below left of=interest] {$j$};
  \node[main node, fill=blue!10] (k) [below right of=j] {$k$};
  \node[main node, fill=burntorange, below right of=interest, distance = 6cm ] (input) 
    [below right of=interest] {input $u$};

\path[every node/.style={font=\sffamily\small}]
(interest)
        edge [bend right] node[left] {$\mathbf{M}_{ji}$} (j)
        edge [loop above] node {$\mathbf{M}_{ii}$} (interest)
        edge [bend left] node {$\mathbf{M}_{ki}$} (k)
(j)     edge node [right] {$\mathbf{M}_{ij}$} (interest)
        edge [loop left] node {$\mathbf{M}_{jj}$} (j)
        edge [bend right] node[left] {$\mathbf{M}_{jk}$} (k)
(k)     edge node [right] {$\mathbf{M}_{kj}$} (j)
        edge node [bend right] {$\mathbf{M}_{ik}$} (interest)
        edge [loop below] node {$\mathbf{M}_{kk}$} (k)
(input) edge [bend right] node {$\mathbf{W}_i$} (interest)
        edge [bend left] node {$\mathbf{W}_k$} (k);
\end{tikzpicture}
\end{document}
share|improve this question
    
@GonzaloMedina: fixed –  mac389 Sep 14 '12 at 20:06

1 Answer 1

up vote 6 down vote accepted

I am not sure if this is what you want:

\documentclass{beamer}
\usepackage{xcolor}
\usefonttheme{serif}
\usepackage{tikz}
\usetikzlibrary{arrows}
\definecolor{burntorange}{cmyk}{0,0.52,1,0}

\begin{document}

\begin{frame}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
 thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]

  \node[main node, scale=1.4] (interest) {$i$};
  \node[main node, fill=blue!10] (j) [below left of=interest] {$j$};
  \node[main node, fill=blue!10] (k) [below right of=j] {$k$};
  \node[main node, fill=burntorange, below right of=interest, distance = 6cm ] (input) 
    [below right of=interest] {input $u$};

\begin{scope}[every node/.style={font=\sffamily\small}]
\path
(interest)
        edge [bend right] node[left] {$\mathbf{M}_{ji}$} (j)
        edge [loop above] node {$\mathbf{M}_{ii}$} (interest)
        edge [bend left] node {$\mathbf{M}_{ki}$} (k);
\path[every edge/.style={gray,draw=gray}]
(j)     edge node [right] {$\mathbf{M}_{ij}$} (interest)
        edge [loop left] node {$\mathbf{M}_{jj}$} (j)
        edge [bend right] node[left] {$\mathbf{M}_{jk}$} (k)
(k)     edge node [right] {$\mathbf{M}_{kj}$} (j)
        edge node [bend right] {$\mathbf{M}_{ik}$} (interest)
        edge [loop below] node {$\mathbf{M}_{kk}$} (k)
(input) edge [bend right] node {$\mathbf{W}_i$} (interest)
        edge [bend left] node {$\mathbf{W}_k$} (k);
\end{scope}
\end{tikzpicture}
\end{frame}

\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.