I want to draw a diagram like this:
My tikz code is as follows:
\documentclass{article}
\usepackage{tikz}
\usepackage[margin=15mm]{geometry}
\usepackage{calc}
\usetikzlibrary{matrix,arrows}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}
\begin{document}
\tikzstyle{int}=[draw, minimum width=3 cm, minimum height=1 cm]
\tikzstyle{init} = [pin edge={to-,thin,black}]
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 1, transform shape]
\tikzstyle{line} = [draw, -latex']
\node [int] (a) { Box1 };
\node [int] (b) [below of=a, node distance=4 cm] {Box2};
\end{tikzpicture}
\end{document}
which outputs as follows:
I don't understand how to draw such arrows at correct locations in tikz. I know only how to draw at center. How can I do this?
Best Answer
In this case, the
let
syntax could be used, as the following example illustrates:Another possibility is to use the implicit syntax for the node coordinate system, using the name of a node together with an anchor or an angle separated by a dot as in
(a.north)
or(a.30)
; the following example uses this approach: