I'm trying to plot a simple graph from .csv. I'm using the answer of https://tex.stackexchange.com/a/83929/164280 as basis. I get a could not parse input '00:00:00' as floating point
error. I do want to plot the data as time series. How do I work around this?
MWE:
\documentclass[11pt, twoside, a4paper]{report}
\usepackage{pgfplots}
\begin{document}
\begin{figure}
\begin{tikzpicture}
\begin{axis}
\addplot table [x=Time, y=AC, col sep=semicolon] {mayriso.csv};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
Datafile snippet:
Time;AC
00:00:00;-0.4442
00:01:00;-0.4445
Edit:
Thanks to marmot, this is now my new MWE:
\documentclass[11pt, twoside, a4paper]{report}
\usepackage[inner = 25mm, outer = 25mm, top = 30mm, bottom = 20mm, headheight = 13.6pt]{geometry}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}
\pgfplotsset{
compat=1.16,
}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
\begin{axis}[width = 0.7\textwidth, height = 0.4\textwidth, date coordinates in=x, xticklabel={\hour.\minute},
ymin=0, ylabel={AC output power (kW)}, axis lines*=left,ymajorgrids,]
\addplot [ultra thick, smooth, green!50!black,] table [x=Time, y=AC, col sep=semicolon] {riso.csv};
\end{axis}
\end{tikzpicture}
\caption{caption}
\label{fig:other version}
\end{figure}
\end{document}
The issue is that the x labels are ugly. I want the x-labels to show hours at regular intervals, so 00:00, 02:00, 04:00 or something like that. I also want the graph x label to start at 00:00 and end at 24:00. How do I do this?