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.

The following is my code:

\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]



\coordinate (a1) [] {};
\node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};
\node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};
\coordinate (b1) [below=2cm of b] {};
\path[->] (a) edge node {  $f$ } (b);
\path[->] (a1) edge node {  $f$ } (a);
\path[->] (b) edge node {  $f$ } (b1);
\end{tikzpicture}

I am getting the following output: enter image description here

I want one arrow from Receiver to b1.

Can anyone tell me my mistake?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You are defining coordinate in a bad way. You should do this:

\coordinate [below=2cm of b] (b1) {};

This way, your code works for me.

So, your complete code should look this way:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\begin{document}
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
\coordinate (a1) {};
\node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};
\node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};
\coordinate[below=2cm of b] (b1)  {};
\path[->] (a) edge node {  $f$ } (b);
\path[->] (a1) edge node {  $f$ } (a);
\path[->] (b) edge node {  $f$ } (b1);
\end{tikzpicture}
\end{document}

And the result is this:

enter image description here

share|improve this answer
add comment

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.