TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a simple plot using pgfplots. I have a problem though that drives me crazy. I'm working on a debian installation and had installed the tex-live version from the repositories. The code below was giving me the following error

! Package pgfkeys Error: I do not know the key '/tikz/nodes near coords' and I am going to ignore it. Perhaps you misspelled it.

I though that the package was outdated and since there was no way to update it otherwise i removed the repo version of tex-live and install the one from their website (version 2011). I'm still getting the same error message though. I have to mention that the same code compiles correctly in my windows installation. Any idea why this might happen?



\chead{\footnotesize {header title} }
\cfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}

\title{my title}


    bar width = 1cm,
    xmin=1, xmax=1,
    xlabel={OpenCL implementation},
    ylabel={time (sec)},
    nodes near coords
    \addplot coordinates {(1, 24.0)}; \addlegendentry{Version 1}
    \addplot coordinates {(1, 14.5)}; \addlegendentry{Version 2}
    \addplot coordinates {(1, 10.0)}; \addlegendentry{Version 3}
    \addplot coordinates {(1,  9.6)}; \addlegendentry{Version 4}
\captionof{figure}{Figure caption}

share|improve this question

closed as too localized by Jake, cmhughes, Stefan Kottwitz May 3 '12 at 11:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I'm pretty sure you have an outdated version of PGFplots. Can you add \listfiles to your preamble and check near the end of the .log file for your version number? – Jake May 2 '12 at 18:41
You have a typo \addledendentry should be \addlegendentry. – Peter Grill May 2 '12 at 18:43
I changes the typo but the problem is still there. I will also correct in the question. as for the version I believe you mean the following if I got it correct. (/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotm arks.code.tex File: tikzlibraryplotmarks.code.tex 2008/01/09 v2.00 (rcs-revision 1.1) (/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex File: pgflibraryplotmarks.code.tex 2007/03/09 v2.00 (rcs-revision 1.5) ))) – gkaran89 May 2 '12 at 18:51
@gkaran89: Check in "Options / Configure TeXmaker" whether it's configured to run pdflatex from the wrong directory. – Jake May 2 '12 at 19:11
sounds like you've got two texlives installed and TeXmaker is pointing to the wrong one – cmhughes May 2 '12 at 19:13

Based on the error message the version of the pgfplots library is outdated. You should upgrade to the latest version.

Using the latest version, and correcting the typo in the last line:

\addplot coordinates {(1,  9.6)}; \addlegendentry{Version 4}

I get the plot shown below. There are probably other pgfplots/tikz libraries that need updating. If you are just starting out, it would be best to do a fresh install of TeXLive and go from there.

enter image description here

share|improve this answer
I changed the typo, but it is not the case. The problem is still there. – gkaran89 May 2 '12 at 18:53

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