I have a problem implementing a tikzpicture. I want to plot the file with date and TIME and a climatic variable. I followed the PGF manual and in section 4.21.2 "Dates as Input Coordinates" and if i do the table of the coordinates "by hand" , everything works as intended:
\begin{tikzpicture}
\begin{axis}
date coordinates in=x,
xtick=data,
xticklabel style=
{rotate=90,anchor=near xticklabel},
xticklabel={\day.\month.},
xlabel={2015},
date ZERO=2015-01-01,% <- improves precision!
\addplot coordinates {
(2015-12-21 00:00, 17.54)
(2015-12-21 00:59, 17.23)
(2015-12-21 01:58, 16.96)
(2015-12-21 02:57, 16.88)
(2015-12-21 03:56, 16.70)
(2015-12-21 04:55, 16.36)
(2015-12-21 05:54, 17.02)
(2015-12-21 06:53, 19.24)
(2015-12-21 07:52, 20.40)
(2015-12-21 08:51, 22.06)
};
\end{axis}
\end{tikzpicture}
But when the parser has looks for the file, as here:
\begin{tikzpicture}
\begin{axis}
date coordinates in=x,
xtick=data,
xticklabel style=
{rotate=90,anchor=near xticklabel},
xticklabel={\day.\month.},
xlabel={2015},
date ZERO=2015-01-01,% <- improves precision!
\addplot table[x=date,y=temperature] {plotdata/temp_summer.dat};
\end{axis}
\end{tikzpicture}
then the following error appears:
! Package PGF Math Error: Could not parse input '00:00,' as a floating point number, sorry. The unreadable part was near ':00,'..
See the PGF Math package documentation for explanation. Type H <return> for immediate help.
...
l.421 ...=temperature] {plotdata/temp_summer.dat};
I get the error messages about the 00:00 or any other hour. The funny thing that it is working if I introduced the coordinates in the .tex file itself.
Í suspect this is a BUG in PGF file parser but I'm not sure, my .tex system is:
pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set
(\pgfplotsset{compat=1.13}).
Let me tell you guys that if I removed the HH:MM then, the file compilation is successful but then, is not what I need!.
Any ideas, any help is GREATLY appreciated.
Thank you in advance.....
Dear Friends and developers. I'm gonna simply answer my own question: the issues come since I, inadvertently, include a table in a file which first row did NOT contain a comma separated field.
So I was telling pgfplots that my file contains commas but the very first row did NOT!. Sorry post this as a BUG.
Please close this Ticket.
Warmest regards.