Example: Time course of events in an experiment

Published 2018-03-20 | Author: Rudolf Siegel

A diagram depicting time course of events in an experiment. Every frame represents a screen presented to a participant. This kind of diagram is mostly used in (cognitive) psychology and neuroscience.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

Time course of events in an experiment

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Time course of events in an experiment
% Author: Rudolf Siegel
        basefont/.style = {font = \Large\sffamily},
          timing/.style = {basefont, sloped,above,},
           label/.style = {basefont, align = left},
          screen/.style = {basefont, white, align = center,
                           minimum size = 6cm, fill = black!60, draw = white}};
  % macro for defining screens
    \begin{scope}[xshift  =#3, yshift = #4,
                  every node/.append style = {yslant = 0.33},
                  yslant = 0.33,
                  local bounding box = #1]
      \node[screen] at (3cm,3cm) {#2};
  % define several screens
  \screen{frame1}{\textbf+} {0}     {0}
  \screen{frame2}{stimuli 1}{150} {-60}
  \screen{frame3}{}         {300}{-120}
  \screen{frame4}{stimuli 2}{450}{-180}
  \coordinate [xshift=750,yshift=-300] (frame6);
  % add annotations
  \foreach \i / \content in {
      1/fixation cross,
      3/blank screen,
      5/recording\\(depending on response)
    \node[label, above right=5em and 1em of frame\i.east]
      (f\i-label) {\content};

  % add time course
  \foreach \j [count=\i] / \content in {
      6/till response
    \path[ultra thick] (frame\i.south west) edge 
      node[timing] {\content} (frame\j.south west);

  % some manual addition
  \path[ultra thick,->] (frame5.south west) edge 
    node[timing, below] {next trial} (frame6);


Adding comments is currently not enabled.