Customizable Timeline
Here's another version with Tikz. The command is as follows:
\nation{mm/yyyy}{mm/yyyy}{level}{color}{label}
The month mm
and year year
are typed in that format, but if you're below 10, you can enter a single digit. So for January 2010, you type 1/2010
. Level is the height of the bar relative to the timeline below.
You could automatize the coloring too, and get rid of an argument to type, it'd be easy to implement.
Output
Code
\documentclass[12pt]{article}
\usepackage[a4paper, margin=1cm, landscape]{geometry}
\usepackage{amsmath}
\usepackage{xstring}
\usepackage{tikz}
\usetikzlibrary{fit, calc}
\pagestyle{empty}
\newcommand\anno{2008} % starting year
\newcommand\target{2018} % ending year
\newcommand\alto{36} % height
\def\months{{"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"}}%
\pgfmathsetmacro\myend{\target-1-\anno}
\pgfmathsetmacro\tix{1/12}
\pgfmathsetmacro\myspacing{24/(\target-1-\anno)}
\newcommand\nation[5]{%
\StrBefore{#1}{/}[\mmstart]
\StrBehind{#1}{/}[\yystart]
\StrBefore{#2}{/}[\mmend]
\StrBehind{#2}{/}[\yyend]
\pgfmathsetmacro\ymstart{(\yystart-\anno)+(1/13*\mmstart)}
\pgfmathsetmacro\ymend{(\yyend-\anno)+(1/13*\mmend)}
\filldraw[fill=#4!50, draw=#4,] (\ymstart,#3-.45) rectangle (\ymend,#3+.45) node [font=\scriptsize, text centered, midway, inner sep=0pt] {#5};
\pgfmathsetmacro\mmone{\months[\mmstart-1]}
\pgfmathsetmacro\mmtwo{\months[\mmend-1]}
\node[rotate=90, anchor=north, inner sep=1pt, font=\tiny\scshape] at (\ymstart,#3) {\mmone};
\node[rotate=90, anchor=south, inner sep=1pt, font=\tiny\scshape] at (\ymend,#3) {\mmtwo};
}
\begin{document}
\begin{tikzpicture}[x=\myspacing cm,y=5mm]
\centering
%draw horizontal line + years
\draw[|->, -latex] (-.5,0) -- (\myend+.5,0);
\path (0,0) -- (0,\alto);
\foreach \x [evaluate=\x as \year using int(\anno+\x)] in {0,...,\myend}{
\draw (\x,0) node[below=7pt,font=\footnotesize] {$\year$};
\draw (\x,-.2) -- (\x,.2);
\draw[loosely dotted] (\x,.2) -- (\x,\alto);
}
\foreach \tick in {0,\tix,...,\myend}{
\draw (\tick,.1) -- (\tick,-.1);
}
\nation{11/2008}{10/2010}{1}{cyan}{Hungary}
\nation{12/2008}{12/2011}{2}{olive}{Latvia}
\nation{5/2009}{6/2011}{3}{gray}{Romania I}
\nation{5/2010}{6/2015}{4}{red}{Greece I \& II}
\end{tikzpicture}
\end{document}
Here is a TikZ (partial) solution.
\documentclass[tikz,border=7mm]{standalone}
% \chronoperiode with 7 parameters
% #1 : country
% #2 : start year
% #3 : start month
% #4 : end year
% #5 : end month
% #6 : level
% #7 : color
\newcommand{\chronoperiode}[7]{
\pgfmathsetmacro{\first}{(#2 - 2008)*12 + #3 - .9} % beginig of the peropd
\pgfmathsetmacro{\last}{(#4 - 2008)*12 + #5 - 1.1} % end of the period
\pgfmathsetmacro{\middle}{(\first+\last)/2} % position of the country name
\fill[#7] (\first,#6-1) rectangle (\last,#6) (\middle,#6-.5) node[white, font=\sf]{#1};
}
\begin{document}
\begin{tikzpicture}[x=2mm,y=5mm]
% draw the grid
\draw[help lines] (0,0) grid[step=1] (132,7);
\draw (0,0) grid[xstep=12,ystep=7] (132,7);
% put months and years under the x-axis
\foreach[count=\a] \aa in {2008,...,2018} {
\draw[gray] (12*\a-12,0) -- +(0,-7mm) node[pos=.5, below right, inner sep=1pt]{$\aa$};
\foreach[count=\m] \mm in {J,F,M,A,M,J,J,A,S,O,N,D}
\node[font=\tiny,below,gray] at (12*\a+\m-12.5,0) {\mm};
}
% plot the data
\chronoperiode{Hungary}{2008}{11}{2010}{10}{1}{cyan}
\chronoperiode{Latvia}{2008}{12}{2011}{12}{2}{olive}
\chronoperiode{Romania I}{2009}{5}{2011}{6}{3}{gray}
\chronoperiode{Greace I \& II}{2010}{5}{2015}{6}{4}{red}
\chronoperiode{Irland}{2010}{11}{2013}{12}{1}{purple}
\chronoperiode{Romania II}{2011}{3}{2013}{6}{5}{magenta}
\chronoperiode{Portugal}{2011}{5}{2014}{6}{6}{orange}
\chronoperiode{Cyprus I}{2011}{12}{2012}{12}{2}{olive}
\chronoperiode{Spain}{2012}{7}{2013}{12}{3}{brown}
\chronoperiode{Cyprus II}{2013}{5}{2016}{3}{2}{teal}
\chronoperiode{Romania III}{2013}{10}{2015}{9}{5}{lightgray}
\chronoperiode{Greece III}{2015}{8}{2018}{8}{1}{lime}
\end{tikzpicture}
\end{document}
This solution uses pgfgantt
:
\documentclass[12pt]{article}
\usepackage[margin=1.0in]{geometry}
\usepackage{pgfgantt}
\usepackage{pdflscape}
\usepackage{capt-of} %caption outside floats
\begin{document}
\begin{landscape}
\captionof{figure}{Timeline of EU Bailouts}
\begin{tikzpicture}
\begin{ganttchart}[%%%
y unit title=0.5cm,
y unit chart=0.6cm,
x unit=0.15cm,
vgrid={*5{draw=none}, dotted},
hgrid,
time slot format=isodate-yearmonth,
compress calendar,
title/.append style={shape=rectangle, fill=black!10},
title height=1,
bar/.append style={fill=green!70},
bar height=.6,
bar label font=\normalsize\color{black!90},
group top shift=.6,
group height=.3,
group peaks height=.2,
]{2008-07}{2018-09}
\gantttitlecalendar{year} \\
\ganttbar{Greece III}{2015-08}{2018-08} \\
\ganttbar{Romania III}{2013-10}{2015-09} \\
\ganttbar{Cyprus II}{2013-05}{2016-03} \\
\ganttbar{Spain}{2012-07}{2013-12} \\
\ganttbar{Cyprus I}{2011-12}{2012-12} \\
\ganttbar{Portugal}{2011-05}{2014-06} \\
\ganttbar{Romania II}{2011-05}{2013-06} \\
\ganttbar{Ireland}{2010-11}{2013-12} \\
\ganttbar{Greece I \& II}{2010-05}{2015-06} \\
\ganttbar{Romania I}{2009-05}{2011-06} \\
\ganttbar{Latvia}{2008-12}{2011-12} \\
\ganttbar{Hungary}{2008-11}{2010-10}
\end{ganttchart}
\end{tikzpicture}
\end{landscape}
\end{document}