I have problem with following example code:
%& --shell-escape --enable-write-18
\documentclass[a4paper,10pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{units}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
use units,
x unit=m,x unit prefix=k,
y unit=N,y unit prefix=m,
xlabel=Distance,ylabel=Force]
\addplot coordinates {
(1,2.3)
(2,2.7)
(3,2.1)
(4,1.8)
(5,1.5)
(6,1.1)
};
\end{axis}
\end{tikzpicture}
\end{document}
A cannot use units in axis labels. A similar code was included in this documentation: http://www.iro.umontreal.ca/~simardr/pgfplots.pdf on page 227.
Errors:
Missing \begin{document}. \usepgfplotslibrary{u (followed by: nits})
Package pgfkeys Error: I do not know the key '/pgfplots/use units' and I am going to ignore it. Perhaps you misspelled it.
Package pgfkeys Error: I do not know the key '/pgfplots/x unit' and I am going to ignore it. Perhaps you misspelled it.
Package pgfkeys Error: I do not know the key '/pgfplots/x unit prefix' and I am going to ignore it. Perhaps you misspelled it.
Package pgfkeys Error: I do not know the key '/pgfplots/y unit' and I am going to ignore it. Perhaps you misspelled it.
Package pgfkeys Error: I do not know the key '/pgfplots/y unit prefix' and I am going to ignore it. Perhaps you misspelled it.
Undefined control sequence: \usepgfplotslibrary (followed by: {units})
What's more, the command \usepgfplotslibrary completely does not work with any other pgfplots library. I don't know what is wrong, but i have to get this working :/ Thank you in advance for your help.
I'm running Debian Sid. Texlive (2009-11), pgf (2.10-1)
/etc/environmentin Ubuntu) – Caramdir May 04 '11 at 20:01.../texlive/2010/bin/.../to e.g./usr/bin– Caramdir May 04 '11 at 20:36