I wish to draw arrows not necessarily at the end of the line, nor in the middle. I would also like to write a node directly above (or below, or to the right, ...) the arrow.
I saw this question, but it doesn't answer all my questions - first of all, it puts the arrow in the middle of the line. I know I can modify that by playing with mark=at position 0.5
, but it's very possible that I'd like a certain position in one line, and a different in the other, i.e. use \draw[mystyle 0.5]
for the middle, \draw[mystyle 0.75]
for having it three-quarters way through etc.. In addition it doesn't solve the nodes issue.
Can anyone give me a hand please?
\usetikzlibrary{decorations.markings,arrows} \begin{tikzpicture}[decoration={ markings, mark=at position 0.4 with {\arrow{>},\node[sloped,transform shape,above] {A};} } ] \draw[postaction={decorate}] (0,0) -- (1,2) ; \end{tikzpicture}
\draw
and two points I get that, (2) it sets the text (as "A") and (3) I have no control on the position of the arrow. Thank you!\begin{tikzpicture}
, it is final - I can no longer change the value0.4
, nor the text - or can I? Anyway, if I indeed do as you suggested in (1), it works - I can set pretty much whatever I want for every arrow. The only problem is that it is a bit long - but I'll live with that... P.S. is it possible to have two or more arrowheads (and draw only on top of one of them)?