I have created a custom timeline plot in tikz, and am aware of other options for timelines but I need mine to be more customizable. A mwe is shown below. I would like to modify this tex file to read in the plot data from a csv file.
Tex file:
\documentclass[12pt,a4paper]{article}
\usepackage{readarray,filecontents}
\usepackage{tikz}
\newcommand\loaddata[1]{\CatchFileDef\loadeddata{#1}{\endlinechar=-1}}
%only necessary for overset
\usetikzlibrary{positioning}
\usepackage{makecell}%
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}[node distance =2mm]
% draw horizontal line
\draw (0,0) -- (11,0) (baseLine) ;
% draw vertical lines and label below with months
\foreach \varXcoord/\varMonth [count=\xx] in {
0/Jan,
1/Feb,
2/Mar,
3/Apr,
4/May,
5/Jun,
6/Jul,
7/Aug,
8/Sep,
9/Oct,
10/Nov,
11/Dec
}
\draw (\varXcoord,3pt) -- +(0,-6pt) node (qBaseTick\xx) [below] {\varMonth};
\fill [pattern=north west lines, pattern color=yellow] (-1,0) rectangle (12.5,4);
\node [above left = 0 and 1 of baseLine]
{
\begin{tikzpicture}
\node [rotate=90, anchor=north] {Location}
\end{tikzpicture}
};
\fill [pattern=north west lines, pattern color=orange] (-1,4) rectangle (12.5,8);
\node [above left = 4 and 1 of baseLine]
{
\begin{tikzpicture}
\node [rotate=90, anchor=north] {Career}
\end{tikzpicture}
};
% enter events at a 45 degree angle with a subscript
\foreach \varXcoord/\varYcoord/\varEvent/\varDate [count=\xx] in {%
% Location
0/0/Abbotsford/January 1,
3/0/Surrey/April 1,
5/1/Vancouver/June 1,
6/0/New\ Westminster/July 1,%
10/0/North\ Vancouver/November 1,
% Career
0.75/4/Ended\ High\ School/Jan 26,
3.3/4/Started\ Trade\ School/April 10,
5.8/4/Ended\ Trade\ School/June 28,
8/4/Started\ Job\ 1/Sept 1,
10.8/4/Started\ Job\ 2/Nov 27
}
{
\draw[<-] (\varXcoord,0) -- (\varXcoord,\varYcoord+0.5);
\node [above right = \varYcoord and \varXcoord + 0.5 of baseLine, rotate=45, anchor=south west] {\makecell[l]{\small${\varEvent}$\\\tiny \varDate}};
}
\end{tikzpicture}
\end{document}


north west linesin your code but not in the image posted. – nidhin Oct 29 '18 at 12:57