0

I'm trying to draw this limbic system (routes of brain connections) using TikZ package in LaTeX

enter image description here

Dashed lines show the learning procedure and circles considered as neurons.

Here's the code I have so far:

\newcommand{\blocwithSum}[3]{
  \begin{scope}[shift={#1}]
    \begin{scope}[every node/.style={circle, draw, minimum size=2em}]
      \node[circle, draw] [blue](#2-c1){};
      \node[below left=1em of #2-c1][red](#2-c2){};
      \node[below left=1em of #2-c2][cyan](#2-c3){};
      \node[below left=1em of #2-c3][green](#2-cn){};
      \node[below right=2em and 1em of #2-c1][blue](#2-sum){\large $\Sigma$}; %to draw the sum
    \end{scope}
    \node[above left=1em and 0em of #2-c1](#2-tt){#2};%Amygdala
    \node[draw,blue,fit=(#2-c1) (#2-c2) (#2-c3) (#2-cn) (#2-tt) (#2-sum)](#2){};%to draw the box4
    \draw[->,red,thick] (#2-c1)-|(#2-sum); \draw[->,blue,thick] (#2-c2)--++(2em,0) --(#2-sum);
    \draw[->,green,thick] (#2-c3)--++(2em,0) --(#2-sum);
    \draw[->,cyan,thick] (#2-cn)-|(#2-sum);
  \end{scope}
}

\begin{tikzpicture}
  \bloc{(0,0)}{Thalamus}
  \bloc{(4cm,0)}{Sensory Cortex}
  \blocwithSum{(9cm,0)}{Orbitofrontal Cortex}
  \blocwithSum{(1cm,-5cm)}{Amygdala}
  \foreach \ii in{1,2,3,n} {
    \node[draw][red](E\ii) at (Thalamus-c\ii-|-5,0){$S_{\ii}$};
    \draw[->,blue,thick] (E\ii)-- (Thalamus-c\ii);
    \draw[->,red,thick] (Thalamus-c\ii) -- (Sensory Cortex-c\ii);
    \draw[->,green,thick] (Sensory Cortex-c\ii) -- (Orbitofrontal Cortex-c\ii);
    \draw[->,thick] (Orbitofrontal Cortex-c\ii) -- (Amygdala-c\ii);
  }
\end{tikzpicture}
  • 1
    Welcome, you may wanna share what you have achieved already instead of repeating some string of words string of words string of words. – Johannes_B Nov 19 '15 at 11:25
  • click here to edit your question and elaborate it more by sharing what you have tried so far. – user72507 Nov 19 '15 at 11:29
  • Thanks rpapa for your help.I tried to complete the diagram above by drawing the part of Amygdala ,I used this code will posted below,but I get Error said 'Error: command \blocwithsum already defined'. – H.Milad Nov 19 '15 at 20:35
  • \newcommand{\blocwithSum}[3]{ \begin{scope}[shift={#1}] \begin{scope}[every node/.style={circle, draw, minimum size=2em}] \node[circle, draw] [blue](#2-c1){}; \node[below left=1em of #2-c1][red](#2-c2){}; \node[below left=1em of #2-c2][cyan](#2-c3){}; \node[below left=1em of #2-c3][green](#2-cn){}; \node[below right=2em and 1em of #2-c1][blue](#2-sum){\large $\Sigma$}; %to draw the sum \end{scope} – H.Milad Nov 19 '15 at 20:42
  • \node[above left=1em and 0em of #2-c1](#2-tt){#2};%Amygdala \node[draw,blue,fit=(#2-c1) (#2-c2) (#2-c3) (#2-cn) (#2-tt) (#2-sum)](#2){};%to draw the box4 \draw[->,red,thick] (#2-c1)-|(#2-sum); \draw[->,blue,thick] (#2-c2)--++(2em,0) --(#2-sum); \draw[->,green,thick] (#2-c3)--++(2em,0) --(#2-sum); \draw[->,cyan,thick] (#2-cn)-|(#2-sum); \end{scope} } – H.Milad Nov 19 '15 at 20:43
10

Here's an outline solution, I leave it to you to complete it.

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc, positioning,fit}

\begin{document}

\newcommand{\bloc}[2]{
\begin{scope}[shift={#1}]
\begin{scope}[every node/.style={circle, draw, minimum size=2em}]  
 \node[circle, draw] (#2-c1){};
 \node[below left=1em of #2-c1](#2-c2){};
  \node[below left=1em of #2-c2](#2-c3){};
   \node[below left=1em of #2-c3](#2-c4){};
 \end{scope} 
    \node[above left=1em and 0em of #2-c1](#2-tt){#2};
\node[draw,fit=(#2-c1) (#2-c2) (#2-c3) (#2-c4) (#2-tt)](#2){};
\end{scope}
 }


\newcommand{\blocwithSum}[2]{
\begin{scope}[shift={#1}]
\begin{scope}[every node/.style={circle, draw, minimum size=2em}]  
 \node[circle, draw] (#2-c1){};
 \node[below left=1em of #2-c1](#2-c2){};
  \node[below left=1em of #2-c2](#2-c3){};
   \node[below left=1em of #2-c3](#2-c4){};
   \node[below right=2em and 1em of #2-c1](#2-sum){\large $\Sigma$};
 \end{scope} 
    \node[above left=1em and 0em of #2-c1](#2-tt){#2};
\node[draw,fit=(#2-c1) (#2-c2) (#2-c3) (#2-c4) (#2-tt) (#2-sum)](#2){};
\draw[->,thick] (#2-c1)-|(#2-sum);
\draw[->,thick] (#2-c2)--++(2em,0) --(#2-sum);
\draw[->,thick] (#2-c3)--++(2em,0) --(#2-sum);
\draw[->,thick] (#2-c4)-|(#2-sum);
\end{scope}
 } 

  \begin{tikzpicture}
 \bloc{(0,0)}{Thalamus} 

  \bloc{(4cm,0)}{Sensory Cortex} 

    \blocwithSum{(9cm,0)}{Orbitofrontal Cortex} 


 \foreach \ii in{1,2,3,4} {
 \node[draw](E\ii) at (Thalamus-c\ii-|-5,0){$Kp_{1-\ii}$};
  \draw[->,thick]  (E\ii)-- (Thalamus-c\ii);
  \draw[->,thick] (Thalamus-c\ii) -- (Sensory Cortex-c\ii);
    \draw[->,thick]  (Sensory Cortex-c\ii) --  (Orbitofrontal Cortex-c\ii);  
 }

  \end{tikzpicture}   
\end{document}
  • I get stuck in Amygdala box,any help please. – H.Milad Nov 19 '15 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.