0

I am new here and appreciate any help given.

I am working on Windows 10 with TeXStudio and Miktex 2.9. My pgfplots Version is 1.17. My example code looks like this:

\documentclass[a4paper,12pt,headsepline]{scrartcl}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{dateplot}

\begin{document} \begin{tikzpicture} \begin{axis}[ title=Inv. cum. normal, xlabel={$x$}, ylabel={$y$}, ] \addplot[blue] table{Daten_Leaking_1.txt}; \end{axis} \end{tikzpicture} \end{document}

So, I am currently about to plot some graphs for my thesis, using pgfplots. I could already plot a graph and it worked fine. But most of data are weight-values with a time stamp for each. The table I want to use, for plotting the data, looks like this (with just more values):

Data table I use for plotting a graph

Its just values seperated by a tabstop. When I try to plot this table I get an Error saying:

Package PGF Math Error: Could not parse input '14:51:06' as a floating point number, sorry. The unreadable part was near ':51:06'.. \addplot[blue] table{Daten_Leaking_1.txt}; 

The Error appears for all rows. When I then have a look at the command:

\usepgfplotslibrary{dateplot}

It is not marked as an error. It is just highlighted red and tells me "Command not recognized" (My TeXStudio is in German. I only translated the error. Might be a different name in English.)

Thats how the code looks like after compiling

So apparently, I can't include any libraries from pgfplots into my document. And thats the point, where I don't know what to do. Do you have any Idea, how to fix this? I am happy for any new insights.

Things I have tried so far:

  1. Plotting the table with all time values written as decimal numbers (like 14:51:04 -> 0.61879707). It works fine and I get a nice graph. so pgfplot itself works well.
  2. Using \usetikzlibrary{pgfplots.dateplot} instead. Gets me the exactly the same error and highlighting
  3. I figgured out by accident, that if I misspell the library i want to add, the eroor changes to this and "\usepgfplotslibrary{dataplot}" is shown as a actual error:
  4. I thought about installing pgfplots manually again. The problem is, that I do not have adminstrator rights on this PC and it would be hard to get. But from what I have seen, scrolling through the files of the installed pgfplots package, the files are pretty much the same, than the ones you get by downloading pgfplots from CTAN.

enter image description here

  1. I tried to include other libraries. The same errors occured.

Greetings and thanks in advance, Carl

Carl
  • 1
  • Welcome to TeX.SX! I guess you get the error because the dateplot library expects dates (+ timestamps), but you are just stating timestamps in your data file ... – Stefan Pinnow Feb 03 '21 at 15:54
  • thx for the answer! But I do not think, thats the issue. Like I saw other examples where only timestamps worked just fine with dateplot. Furthermore I can't include other libraries. I think the error has something to do with the libraries, and that they can't be included. – Carl Feb 03 '21 at 16:01
  • It doesn't necessarily mean anything that TeXstudio highlights something as red, what really matters is whether you get get any errors when generating the PDF. There should be a panel at the bottom of TeXstudio called "Log" (or the equivalent in German), what does it say there when you try generating a PDF. Further, the manual states that the dateplot library doesn't have support for seconds (see also https://tex.stackexchange.com/q/118676) , and that the date has to be included. – Torbjørn T. Feb 03 '21 at 18:12
  • So the Error says this: I can't find file 'pgflibrarypgfplots.dataplot.code.tex'. \usepgfplotslibrary{dataplot} and: Emergency stop. \usepgfplotslibrary{dataplot} I also tried 1. to use the same Data but add a date to the time -> didn't work, 2. to cut the seconds and only use minutes and hours + date -> didn't work either. – Carl Feb 08 '21 at 06:48

0 Answers0