Graphics, Figures & TablesParallel Lines between two Blocks

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Parallel Lines between two Blocks

Post by localghost »

Saed Daoud wrote:[…] I attached a hand-drawn figure of what I want.
Good idea. Sometimes a picture is better.

You can try something like this.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc,shadows}

\tikzstyle{sensor}=[
  draw,
  fill=blue!20,
  text width=5em,
  text centered,
  minimum height=2.5em
]
\tikzstyle{naveqs}=[
  sensor,
  text width=4em,
  fill=gray!40,
  minimum height=12em,
  rounded corners,
  shade,
  drop shadow
]

\begin{document}
  \begin{tikzpicture}[>=latex]
    \node (s2p) [naveqs] {S/P};
    \node (fft) [naveqs,right of=s2p,node distance=3cm] {FFT};
    \draw[->] (s2p.65) -- (fft.115);
    \draw[->] (s2p.50) -- (fft.130);
    \draw[->] (s2p.295) -- (fft.245);
    \fill ($(s2p)+(1.5,0)$) circle[radius=1pt] +(0,0.5) circle[radius=1pt]  +(0,-0.5) circle[radius=1pt];
  \end{tikzpicture}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Saed Daoud
Posts: 14
Joined: Thu Jun 06, 2013 4:24 pm

Parallel Lines between two Blocks

Post by Saed Daoud »

localghost wrote:
Saed Daoud wrote:[…] I attached a hand-drawn figure of what I want.
Good idea. Sometimes a picture is better.

You can try something like this.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc,shadows}

\tikzstyle{sensor}=[
  draw,
  fill=blue!20,
  text width=5em,
  text centered,
  minimum height=2.5em
]
\tikzstyle{naveqs}=[
  sensor,
  text width=4em,
  fill=gray!40,
  minimum height=12em,
  rounded corners,
  shade,
  drop shadow
]

\begin{document}
  \begin{tikzpicture}[>=latex]
    \node (s2p) [naveqs] {S/P};
    \node (fft) [naveqs,right of=s2p,node distance=3cm] {FFT};
    \draw[->] (s2p.65) -- (fft.115);
    \draw[->] (s2p.50) -- (fft.130);
    \draw[->] (s2p.295) -- (fft.245);
    \fill ($(s2p)+(1.5,0)$) circle[radius=1pt] +(0,0.5) circle[radius=1pt]  +(0,-0.5) circle[radius=1pt];
  \end{tikzpicture}
\end{document}
OK, that is very much what I wanted.

Thanks a lot for your help, I appreciate it.

Regards
Post Reply