I am trying to position some arrows below a table and can't get them in the right place. The code below is how far I have got. The image shows roughly how I want the arrows to look, but positioned between the lines at the foot of the table, with the labels ("1-2") etc. centred below each arrow. The arrows should be positioned so that they start in the middle of one column and end in the middle of the next column.
\documentclass{article}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{tikzmark,arrows.meta,patterns,calc}
\newcommand\DrawArrow[4][]{
\begin{tikzpicture}[
remember picture,
overlay,
arr/.style={draw=gray,line width=2pt, {-latex}, #1}
]
\draw[arr]
([shift={(15pt,-1ex)}]pic cs:#2)
to[out=-40,in=220] node[below=8pt] {#4}
([shift={(6pt,-1ex)}]pic cs:#3);
\end{tikzpicture}
}
\newcommand\DrawArrowB[4][]{
\begin{tikzpicture}[
remember picture,
overlay,
arr/.style={draw=gray,line width=2pt, {-latex}, #1}
]
%-.5ex cotrols gap between bottom of table and start of arrow head
%6pt etc. controls horizontal position
\draw[arr]
([shift={(6pt,-.8ex)}]pic cs:#2)
to[out=-40,in=220] node[below=8pt] {#4}
([shift={(-8pt,-.8ex)}]pic cs:#3);
\end{tikzpicture}
}
\begin{document}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.8]{CLmethoddiagram.png}
\caption{png version - low res}
\end{figure}
\begin{table}[htbp]
\centering
\caption{tikz version}
\begin{tabular}{@{}lllllll@{}}
\toprule
& \multicolumn{6}{c}{Development year} \\
\cmidrule(l){2-7}
{Year} & {1} & {2} & {3} & {4} & {5} & {6} \\
\midrule
2009 & 443 & 1,136 & 2,128 & 2,898 & 3,403 & 3,873 \\
2010 & 396 & 1,333 & 2,181 & 2,986 & 3,692 & \\
2011 & 441 & 1,288 & 2,420 & 3,483 & & \\
2012 & 359 & 1,421 & 2,864 & & & \\
2013 & 377 & 1,363 & & & & \\
2014 & \tikzmark{start1B}344& \tikzmark{start2B}- & \tikzmark{start3B} - & \tikzmark{start4B} - & \tikzmark{start5B} - &\tikzmark{start6B} - \\
\midrule
&&&&&&\\
\DrawArrow{start1B}{start2B}{1-2}
\DrawArrowB{start2B}{start3B}{2-3}
\DrawArrowB{start3B}{start4B}{3-4}
\DrawArrowB{start4B}{start5B}{4-5}
\DrawArrowB{start5B}{start6B}{5-6}
&&&&&&\\
\bottomrule
\end{tabular}%
\end{table}%
\end{document}
This is what the code produces