But a day has 1440 minutes, not 2400. So setting the interval between 00:00 and 24:00, with a (wrongly) implied scale of 100 per hour.
Is there a way to change this?
Code: Select all
\documentclass[english]{book}
\usepackage{charter}
\usepackage{pgfplotstable}
\newcommand{\vtimeline}{%
\begin{tikzpicture}
\begin{axis}[
y post scale=-1,
footnotesize,
hide x axis,
axis y line=left,
axis line style={-, draw=none},
ytick=data,
xmin=0.99,
clip=false,
nodes near coords,
nodes near coords align=right,
point meta=explicit symbolic,
yticklabel style={
/pgf/number format/set thousands separator={},
inner sep=1pt
},
scale only axis,
width=1mm,
height=23cm,
tick align=outside,
every tick/.append style={thin, cyan}
]
\addplot [mark=*,cyan,mark size=2, shorten <=-2mm, shorten >=-2mm, thick] table[y index=0, x expr=1, meta=label] {\datatable};
\end{axis}
\end{tikzpicture}
}
%%% FIELDS %%%
% not the real title, but now I wish it was
\title{Hello World: Does A Computer Programmed to be Polite Actually Have Good Manners?}
\author{Anony. E. Mouse}
\date{}
\begin{document}
\frontmatter
\maketitle
\tableofcontents
\setcounter{page}{0}
\mainmatter
\pgfplotstableread[col sep=semicolon]{
start ; end ; label
0000 ; 0000 ;
0800 ; 0800 ; Foo
0800 ; 0822 ; Bar
0826 ; 0826 ; Event1
0826 ; 0857 ; Event2
0857 ; 0857 ; Event3
0900 ; 0934 ; Event4
0935 ; 0957 ; Event5
0957 ; 1100 ; Event6
1100 ; 1239 ; Event7
1239 ; 1315 ; Event8
1315 ; 1411 ; Event9
1411 ; 1641 ; Abc
1641 ; 1655 ; Xyz
1655 ; 1708 ; Last entry
2400 ; 2400 ;
}\datatable
\vtimeline
\backmatter
\end{document}

PS. Sorry in advance for making two threads this week. I'm getting into tables and pgf/tikz and to be honest it is quite daunting. Thank you very much to anyone who can help me gain any insight.