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.
\documentclass{article}
\usepackage{graphicx}
% \usepackage{amsfonts}
% \usepackage{amsmath}
% \usepackage{verbatim}



\usepackage{tikz}
\usetikzlibrary{arrows}


\tikzstyle{male}=[circle,fill=blue!20,draw,font=\sffamily\Large\bfseries]
\tikzstyle{female}=[circle,fill=red!20,draw,font=\sffamily\Large\bfseries]

\begin{document}



\begin{figure}[!htb]
  \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,thick, main  node/.style={circle,draw,fill=red!20,font=\sffamily\Large\bfseries}]
    \node[main node] (1) {1};
    \node[main node] (2) [below left of=1] {2};
    \node[main node] (3) [below right of=2] {3};
    \node[main node] (4) [below right of=1] {4};

    \path[every node/.style={font=\sffamily\small}]
      (1) edge node {} (3)
          edge [bend right] node[left] {} (2)
      (2) edge node {} (4)
          edge node {} (1)
      (3) edge node[left] {} (2)
          edge [bend right] node[right] {} (4)
      (4) edge node[left] {} (3);
    \end{tikzpicture} %
  \end{figure}

 \end{document}
share|improve this question
2  
Welcome to TeX.SX. Add a [red] to the edges pointing to 3; i.e. (4) edge[red] node[left] {} (3);. Change the color as you prefer. –  Claudio Fiandrino Sep 13 '13 at 12:38
    
Thanks! Problem solved! –  stella Sep 13 '13 at 13:11
    
@ClaudioFiandrino to the answering booth please... –  percusse Sep 13 '13 at 15:10
    
@percusse: did it :) –  Claudio Fiandrino Sep 13 '13 at 15:21

1 Answer 1

To add the color only to the edges pointing to a given node (3 in this case), add the option [color-name] to the key edge of any link i -> 3. For example:

...(4) edge[red] node[left] {} (3);
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.