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.

I'm new to TikZ, and I can't seem to figure out how to align lines to a text box.

In the figure below, the bottom arrow is aligned exactly how I would like (from the upper right corner of box C to the bottom left corner of box I. When I create a text box that contains greater than 1 character, the arrow becomes misaligned as in the top arrow.

How can I get the beginning of the line aligned to variable sized boxes?

enter image description here

Here is my current code:

\begin{figure}

\tikzstyle{vspecies}=[rectangle, minimum size=0.5cm,draw=black,fill=white]
\begin{tikzpicture}[auto, outer sep=1pt, node distance=2cm,>=latex']

\node [vspecies] (I) {I} ;
\node [vspecies, above left of = I] (S) {SFs} ;
\node [vspecies, below left of = I] (C) {C} ;
\draw [->,thick] (S) --  node {\small{$63$}} (I) ;
\draw [->,thick] (C) --  node [below right] {\small{$733$}} (I) ;

\end{tikzpicture}

\end{figure}
share|improve this question

1 Answer 1

up vote 8 down vote accepted

Simply refer to .south east of the node, similar for other corners (.north west etc.).

\draw [->,thick] (S.south east) --  node {\small{$63$}} (I) ;

arrow from bottom right corner of a node

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.