This question already has an answer here:

I would like to draw lines which have two colors along the complete length. In principle I could draw two lines next to each other which are slightly shifted, however, this seems like a whole lot of fiddling with coordinates to get everything right. Is there some generic way to do this, or has somebody already written something like this and made it so that it is portable?

A short example:

  \node [circle,fill] (e0) at (5,1.5) {};
  \node [circle,fill] (e1) at (0,0) {};
  \node [circle,fill] (e2) at (10,0) {};
  \node [circle,fill] (e4) at (5,3.5) {};
  \draw [ultra thick, blue] (e1) to  (e2);
  \draw [ultra thick, green] (e1) to (e4);
  \draw [ultra thick, blue](e1) to (e4);
  \draw [ultra thick, blue] (e2) to (e4);
  \draw (e1) to (e2);
  \draw [ultra thick, green] (e0) to (e1);
  \draw (e0) to (e2);
  \draw [ultra thick, green] (e0) to (e4);

I would like the edge from e1 to e4 to be green and blue, with the green line running along the inside of the triangle and the blue line along the outside of the triangle.

marked as duplicate by Qrrbrbirlbel, Mensch, Heiko Oberdiek, cmhughes, Andrew Swann Sep 18 '13 at 15:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.