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.

In a previous question I enjoyed a beautifull graph How improve tikZ graphs arrows rendering?

How can I add label on arcs produced by:

\draw[arrow] (NodeName)--(OtherNodeName);
share|improve this question
    
Do you mean "edge" instead of "arc"? –  Tom Bombadil Oct 4 '12 at 21:55

1 Answer 1

up vote 6 down vote accepted

You simply add a node before the semi colon:

enter image description here

References:

Code:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\draw[->, ultra thick, blue] (0,0)--(1,2) node [pos=0.5, above, red, sloped] {label};
\end{tikzpicture}
\end{document}
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.