[Tex/LaTex] Adjust the distance between one pair of blocks in block diagram

blockdiagrams

enter image description here

I want to move only the second block near to the third block so that variables between first and second block are clearly seen. Other parts of block diagram should be kept the same. I have attached the output as .png image and the code is below

\documentclass[english]{IEEEtran}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{float}
\usepackage{amsbsy}
\usepackage{graphicx}
\usepackage{babel}
\makeatletter
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,shadows}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatother

\usepackage{babel}
\begin{document}
\begin{figure}[H]
\tikzstyle{block} = [draw, rectangle, minimum height=3em, minimum width=3em]
\tikzstyle{output} = [coordinate]
\begin{tikzpicture}[auto, node distance=2.2cm,>=latex']
%placing the blocks
\node[text width=5em] [block] (node1) {ZC sequence generation $u,v,N_{cs}$};
\node[text width=3em] [block, right of=node1] (node2) {point point point };
\node[text width=2em] [block, right of=node2] (node3) {taking inverse};
\node[text width=4em] [block, right of=node3] (node4) {up filter sam};
\node[text width=5em] [block, below of=node4] (node5) {Add PP};
\node[text width=4em] [block, left of=node5] (node6) {Shifty Res Blo};
\node [output, left of=node6] (output) {};
%\node[dspnodeopen,dsp/label=above,left of=node6] (node7) {Tx}; 
%connecting the blocks
\draw (0.98,0)--(1,0)[draw,->] (node1) -- node {$z_{u,v}(n)$} (node2);
\draw[-> ] (node2) -- (node3);
\draw[-> ] (node3) -- (node4);
\draw[-> ] (node4) -- (node5);
\draw[-> ] (node5) -- (node6);
\draw[-> ] (node6) -- node [name=Tx] {Tx}(output);  
%\draw[-> ] (node6) -- (node7);
\end{tikzpicture}\caption{\label{transmitter_block_diagram}transmission}
\end{figure}
\end{document

Best Answer

Placing nodes relative to one another is better done with the help of positioning library. Add \usetikzlibrary{positioning} and change all of = to = of. Then adjust the node distance (which I kept as 1.3cm).

\documentclass[english]{IEEEtran}
\usepackage{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,shadows,positioning}


\usepackage{babel}
\begin{document}
\begin{figure}[htb]%[H]
\tikzstyle{block} = [draw, rectangle, minimum height=3em, minimum width=3em]
\tikzstyle{output} = [coordinate]
\begin{tikzpicture}[auto, node distance=1.3cm,>=latex']
%placing the blocks
\node[text width=5em,block] (node1) {ZC sequence generation $u,v,N_{cs}$};
\node[text width=3em,block, right = of node1] (node2) {point point point };
\node[text width=2em,block, right = of node2] (node3) {taking inverse};
\node[text width=4em,block, right = of node3] (node4) {up filter sam};
\node[text width=5em,block, below = of node4] (node5) {Add PP};
\node[text width=4em,block, left = of node5] (node6) {Shifty Res Blo};
\node [output, left = of node6] (output) {};
%\node[dspnodeopen,dsp/label=above,left of=node6] (node7) {Tx};
%connecting the blocks
\draw (0.98,0)--(1,0)[draw,->] (node1) -- node {$z_{u,v}(n)$} (node2);
\draw[-> ] (node2) -- (node3);
\draw[-> ] (node3) -- (node4);
\draw[-> ] (node4) -- (node5);
\draw[-> ] (node5) -- (node6);
\draw[-> ] (node6) -- node [name=Tx] {Tx}(output);
%\draw[-> ] (node6) -- (node7);
\end{tikzpicture}%
\caption{\label{transmitter_block_diagram}transmission}
\end{figure}
\end{document}

enter image description here

Remember that positioning library is more accurate in relative positioning.

Related Question