I am trying to create a plot, and while I am very new to LaTeX, I feel like I've gotten a good feel for it. However, I cannot seem to fix this error:

Package PGF Math Error: Could not parse input " as a floating point number, sorry. The unreadable part was near ".. 

I have tried for 2 hours now, to find any solutions to no avail. Can anyone guide me?

Here is my code:

    ylabel={rente i \%},
    xmin=1988, xmax=2019,
    ymin=-2.0, ymax=12.0,
    xticklabel style={/pgf/number format/1000 sep=,rotate=60,anchor=east,font=\normalsize},
    legend pos=north east,
    grid style=dashed,

  coordinates {

    \legend{10-årig statsobligation}    

\end{tikzpicture} \\
  • LaTeX errors are not alway easy to guess the meaning of -but you can always uncomment lines until you have a bare minimum that works -and from there slowly find the line and exact thing that is causing the problem. – hpekristiansen Mar 14 '17 at 16:39

pgfplots is expecting another number in a list. Change ytick={0.0,2.5,5.0,7.5,10.0,} to ytick={0.0,2.5,5.0,7.5,10.0} (remove the comma before the }).

  • Wow, thank you SO much!! I'll definitely keep this in mind in the future. You are a god send, haha. Have a nice day Erik! – Philip Mar 14 '17 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.