7

Can anyone help in producing movement diagrams (in the context of Game Theory) in LaTeX? See the attached image for what I am aiming for.

enter image description here

I've produced the corresponding payoff table as seen below using the LaTeX code below:

\begin{table}[h]
\centering
\setlength{\extrarowheight}{2pt}
\begin{tabular}{cc|ccc}
    \multicolumn{2}{c}{} & \multicolumn{2}{c}{Colin}\\
    \multicolumn{1}{c}{}&  & A  & B \\\cline{2-4}
    \multirow{3}*{Rose}  & A & $1$ & $-5$ \\
    & B & $-2$ & $4$ \\
    & C & $0$ & $3$ \\
\end{tabular}
\end{table}

This code produces:

enter image description here

So essentially I need to put arrows in place of the numbers without them overlapping.

1 Answer 1

5

You could just build it using arrows:

(edited to add Torbjørn's excellent suggestion to skip the padding on the cells)

\documentclass{article}
\usepackage{array}
\usepackage{multirow}

\usepackage{graphicx}

\begin{document}
\begin{table}[h]
\centering
\setlength{\extrarowheight}{2pt}
    % Including Torbjørn's suggestion to skip padding
\begin{tabular}{cc|c@{}c@{}cc}
    \multicolumn{2}{c}{} & \multicolumn{3}{c}{Colin}\\
    \multicolumn{1}{c}{}&  & A &  & B \\\cline{2-5}
    \multirow{3}*{Rose}  & A & 
        \multirow{3}*{\resizebox{8pt}{25pt}{$\uparrow$}} & 
        $\resizebox{30pt}{6pt}{$\rightarrow$}$ & 
        \multirow{3}*{\resizebox{8pt}{25pt}{$\downarrow$}} \\
    & B && $\resizebox{30pt}{6pt}{$\leftarrow$}$ & & \\ 
    & C && $\resizebox{30pt}{6pt}{$\leftarrow$}$& & \\
\end{tabular}
\end{table}

\end{document}

enter image description here

Not as elegant as a TkiZ solution would be but faster.

Sad thing is, I'm on here procrastinating Game Theory homework.

2
  • 2
    Perhaps \begin{tabular}{cc|c@{}c@{}cc} to reduce the spacing a bit. Sep 29, 2016 at 8:58
  • @TorbjørnT. That's a great idea, I added it in
    – Ryan
    Sep 29, 2016 at 9:04

You must log in to answer this question.

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