4

I want to produce a diagram with some texts in it that looks as follows:

enter image description here

My working code is as follows:

\documentclass[12pt]{article}

\usepackage{tikz,tikz-cd,pgf}

\usetikzlibrary{arrows, matrix, positioning, shapes, shapes.geometric, calc, intersections, decorations.pathreplacing}

\begin{document} 

\section{Background and motivation}

\tikzstyle{block} = [rectangle, draw, fill=black!10!green, 
text width=6em, text centered, ellipse, minimum height=4em]

\vspace{1cm}

\begin{figure}[!h]
    \centering
    \begin{tikzpicture}[node distance = 5cm, auto]
        % Place nodes
        \node [block] (prime) {\textbf{PRIME NUMBERS}};
        \node [block, right of=prime, node distance=8cm] (chap1) {\textbf{Elementary EEG signals}};     
    \end{tikzpicture}
\end{figure}
\end{document}

that produces:

enter image description here

How can I do this?

3
  • for plain arrows have alook athe answer below
    – js bibra
    Feb 7, 2021 at 8:08
  • How can I add some text in it @jsbibra? Feb 7, 2021 at 8:55
  • --i have added some text to the left ellipse -- you should be able to duplicate for the right ellipse -- in case of difficulty please revert -- in case the answer helped you please accept and upvote
    – js bibra
    Feb 7, 2021 at 15:16

1 Answer 1

2

add the following lines to your code

   \draw[->, out=75, in=110, looseness=1] (prime) to (chap1);    
    \draw[->, out=255, in=285, looseness=1] (chap1) to (prime); 

to get

enter image description here

EDIT-- add text in node

enter image description here

\documentclass[12pt]{article}

\usepackage{tikz,tikz-cd,pgf, makecell}

\usetikzlibrary{arrows, matrix, positioning, shapes, shapes.geometric, calc, intersections, decorations.pathreplacing}

\begin{document} 

\section{Background and motivation}

\tikzstyle{block} = [draw, fill=black!10!green, text centered, ellipse, minimum height=14em, text width=5cm]

\vspace{1cm}

\begin{figure}[!h]
    \centering
    \begin{tikzpicture}[node distance = 7cm]
        % Place nodes
        \node [block] (prime) {};
        \node [block, right of=prime, node distance=10cm] (chap1) {\textbf{Elementary EEG signals}}; 
        
           \draw[-Latex,blue,line width=3pt, out=75, in=110, looseness=1] (prime) to (chap1);    
        \draw[-Latex, blue,line width=3pt,out=255, in=285, looseness=1] (chap1) to (prime); 
            
        \node[] at (prime.center) {\textbf{PRIME NUMBERS}};
        \node[align=left] at ([yshift=-1cm, xshift=1cm]prime.north west) {\makecell[l]{some\\text}};
        \node[align=left] at ([yshift=-1cm, xshift=-1cm]prime.north east) {\makecell[l]{some\\text}};
        \node[align=left] at ([yshift=1.5cm, xshift=0cm]prime.south) {\makecell[l]{some\\text}};
    \end{tikzpicture}
\end{figure}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .