4

Could someone help me to recreate this graph using TikZ: enter image description here

This is what I have so far (using doves instead of butterflies), which is just one of the four lattices and without the arrows:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,chains,%
    decorations.pathreplacing}
\usepackage{phaistos} % animal symbols

\begin{document}
    \begin{tikzpicture}[
        start chain = going right,
        node distance = 0pt,
        AStyle/.style={draw, minimum width=2em, minimum height=2em, 
           outer sep=0pt, on chain, fill=yellow!0!white}]
        \node [AStyle] (1) {\huge\textcolor{red}{\PHdove}};
        \node [AStyle] (4) {\huge\textcolor{blue}{\PHdove}};
        \node [AStyle] (5) {\huge\textcolor{green!50!black}{\PHdove}};
        \node [AStyle] (6) {\huge\textcolor{purple}{\PHdove}};
    \end{tikzpicture}
\end{document}

EDIT: I am only trying to recreate the scheme, not the butterflies themselves.

  • 1
    Do you want also the butterflies made with tikz or only the scheme? – CarLaTeX Mar 27 '17 at 8:32
  • I can use \PHdove instead of the butterflies, so the scheme is good enough – Zdenko Heyvaert Mar 27 '17 at 8:40
10

This is a possible solution with a rectangle split as main node and positioning library helping to place them.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,shapes.multipart,
     positioning}
\usepackage{phaistos} % animal symbols

\begin{document}
\begin{tikzpicture}[font=\sffamily,
    array/.style={rectangle split, 
            rectangle split parts=4, 
            rectangle split horizontal, 
            draw, minimum height=2em, font=\huge},
    arrow/.style={-{LaTeX}, shorten >=2pt, shorten <=2pt}
    ]
   \node [array, label={Species presence/absence}] (1) {%
            \textcolor{red}{\PHdove}
        \nodepart{two}
            \textcolor{blue}{\PHdove}
        \nodepart{three}
            \textcolor{green!50!black}{\PHdove}
        \nodepart{four}
            \textcolor{purple}{\PHdove}};

   \node [array, below=of 1] (2) {%
            \textcolor{red}{\PHdove}
        \nodepart{two}
            \textcolor{blue}{\PHdove}
        \nodepart{three}
            \textcolor{green!50!black}{\PHdove}
        \nodepart{four}
            \textcolor{purple}{\PHdove}};

   \node [array, right=2cm of 1, label={Species presence/absence}] (3) {%
            \textcolor{red}{\PHdove}
        \nodepart{two}
            \textcolor{blue}{\PHdove}
        \nodepart{three}
            \textcolor{green!50!black}{\PHdove}
        \nodepart{four}
            \textcolor{purple}{\PHdove}};

   \node [array, below=of 3] (4) {%
            \textcolor{red}{\PHdove}
        \nodepart{two}
            \textcolor{blue}{\PHdove}
        \nodepart{three}
            \textcolor{green!50!black}{\PHdove}
        \nodepart{four}
            \textcolor{purple}{\PHdove}};

    \draw[arrow] (1)--(2) node[midway, right, align=left] {Stochastic\\Fluctuation};

    \draw[arrow] (2)--++(270:15mm) node[midway, right, align=left] {Stochastic\\Fluctuation} node[below] {\dots};

    \draw[arrow] (3)--(4) node[midway, right, align=left] {Stochastic\\Fluctuation};

    \draw[arrow] (4)--++(270:15mm) node[midway, right, align=left] {Stochastic\\Fluctuation} node[below] {\dots};

    \draw[arrow] ([xshift=-3mm]1.north west) -- ([shift={(-3mm,-6mm)}]2.south west) node[midway, rotate=90, above]{Time};

    \draw[arrow] ([xshift=-3mm]3.north west) -- ([shift={(-3mm,-6mm)}]4.south west) node[midway, rotate=90, above]{Time};

\end{tikzpicture}
\end{document}

enter image description here

  • Very very good the answer and the question. For my humble opinion the name of the question is not very good because it is very generic and it is not specific. – Sebastiano Mar 12 at 12:56

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.