There are a number of ways you can do this in TikZ. Here are three examples:
\begin{tikzpicture}
\node[anchor=east] at (0,0) (text) {This is some text.};
\node[anchor=west] at (3,1) (description) {Here is the description.};
\draw (description) edge[out=180,in=0,->] (text);
\end{tikzpicture}
\begin{tikzpicture}
\node[anchor=east] at (0,0) (text) {This is some text.};
\node[anchor=west] at (3,1) (description) {Here is the description.};
\draw[->] (description) -| (text);
\end{tikzpicture}
\begin{tikzpicture}
\node[anchor=east] at (0,0) (text) {This is some text.};
\node[anchor=west] at (3,1) (description) {Here is the description.};
\draw[->] (description) .. controls ([xshift=-4cm] description) and ([xshift=4cm] text) .. (text);
\end{tikzpicture}
which produces
Well, this one was a little strange but I think I know what is happening. Let me take a brief detour: Consider the following construction
\draw (0,0) -- (1,1) node (a) {A};.
What we expect from this piece of code is to put a node after the main path is created. Notice that the node has no idea of the nature of the path. Even if we use [pos=0.xx]
it just looks for the last available path so there is no organic connection between the node placement and the path creation.
It turns out that edge
is a to
operation added in a similar manner without any relation whatsoever to the main path constructed before that. Another example (zoomed in)
\begin{tikzpicture}
\path[->,
draw,
line width=1mm % To make the arrowhead bigger
] (0,0);
\end{tikzpicture}
So, an arrowhead with a path of zero length. Same happens with the edge if we dissect one of your paths
\path [line] (leftrow1.two north) % This is the main path as the example above
edge[out=90, in=90] node {}(tripletoprow); % This is added afterwards without the
% line option in place creating the
% illusion that the path is having
% a disconnected arrowhead
so shorten makes things even worse because it's shortening a zero length path taking the arrowhead even further. Once we get the problem right, then, it's easy to fix the problem via shifting the line
option to the edge
;
\documentclass[preview,tikz,border=3mm]{standalone}
\usetikzlibrary{shapes, arrows}
\tikzset{line/.style={draw, latex'-},
seq/.style={rectangle split, rectangle split horizontal, rectangle split parts=#1, draw}
}
\begin{document}
\begin{tikzpicture}
\node [seq=3] (leftrow1) at (0cm, 4cm){};
\node [seq=3] (tripletoprow) at (4cm, 4cm){};
\path (leftrow1.two north) edge[out=90, in=90,line] (tripletoprow);
\end{tikzpicture}
\end{document}
Also see the manual for the \tikztonodes
operation to avoid the extra node{}
before the target point.
Best Answer
You can use the
<coordinate>!<number>!<second coordinate>
syntax; for example(3,3)!.25!(0,0)
means "the coordinate that is one quarter on the way from(3,3)
to(0,0)
". To place the label in the middle of the arrow, use themidway
option. An example:Even closer to waht you need, is the
<coordinate>!<dimension>!<second coordinate>
syntax, which means "use the point that is distanced<dimension>
from<coordinate>
on the straight line from<coordinate>
to<second coordinate>
". A little example: :And, of course, you can wrap this in a macro, as the following example suggests. The
\arrowfromto[<attributes>]{<initial coordinate>}{<to coordinate>}{<distance>}{<label>}
macro will apply\draw
with the options given in the first optional argument, from<initial coordinate>
to a point that is<distance>
far away from it and on the straight line from<initial coordinate>
to the<to coordinate>, using a label given by
`: