6

How to draw something like this?

enter image description here

pmichna
  • 179
  • 5
    Welcome to TeX.SX. Please show us, what you have tried so far. This is just a "Do-it-for-me" question. Have you read http://tex.stackexchange.com/q/82255 and http://tex.stackexchange.com/q/61237 and http://tex.stackexchange.com/q/161257 and so many others on this side? – LaRiFaRi Apr 15 '14 at 15:54
  • Perhaps the package timeline will help –  Apr 15 '14 at 15:54

1 Answers1

11

One option using TikZ:

\documentclass{article} 
\usepackage{tikz}
\usepackage{amsmath}

\definecolor{mygreen}{RGB}{117,167,117}
\definecolor{myred}{RGB}{255,1,1}

\newcommand\myent[3]{%
\footnotesize%
$\begin{array}{@{}r@{}} 
#1 \\ #2 \\#3
\end{array}$%
}

\begin{document}

\begin{tikzpicture}[x=1.5cm]
\draw[mygreen,->,thick,>=latex]
  (0,0) -- (5,0) node[below right] {$\scriptstyle t$};
\foreach \Xc in {0,...,4}
{
  \draw[mygreen,thick] 
    (\Xc,0) -- ++(0,5pt) node[above] {$\scriptstyle \Xc$};
}
\foreach \Xc/\Texto in {1/Load,2/Escape,3/Shoot}
{
  \fill[myred] 
    ([xshift=5pt]\Xc,0.25)  
      rectangle node[above] {\strut\small\Texto} 
    ([xshift=-5pt]\Xc+1,0.35);  
}
\node[below,align=left,anchor=north,inner xsep=0pt,color=myred] 
  at (0,0) 
  {\myent{a}{\neg l}{\neg h}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (1,0) 
  {\myent{a?}{l?}{h?}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (2,0) 
  {\myent{a?}{\color{myred}l\ast}{h?}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (3,0) 
  {\myent{a?}{l?}{\color{myred}h\ast}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (4,0) 
  {\myent{a?}{\color{myred}\neg l\ast}{h?}};  
\end{tikzpicture}

\end{document}

The result:

enter image description here

Gonzalo Medina
  • 505,128