TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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.