I'm relatively new to LaTeX and I'm having an issue with
legend pos
from pgfplots package. This command is working on TeXworks on my Mac but does not seem to work on TeXmaker on Ubuntu. I thought at first that the pgfplots package was not installed but it seems to work for other commands.Would anyone know why? Below is the code and the reason why it is not compiling.
Code: Select all
\documentclass[12pt]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{center}
\begin{tikzpicture}
\begin{axis}[legend pos= north west,
xlabel=wind speed($ms^ {-1}$),
ylabel=height($m$)]
\addplot[color=black,mark=x] coordinates {
(1.93374, 2.50000)
(2.31850, 7.50000)
(2.49740, 12.50000)
(2.61524, 17.50000)
(2.70326, 22.50000)
(2.77354, 27.50000)
(2.83204, 32.50000)
(2.88216, 37.50000)
(2.92599, 42.50000)
(2.96495, 47.50000)
(3.00000, 52.50000)
};
\addlegendentry {a}
\end{axis}
\end{tikzpicture}
\caption{Comparison of wind profiles}
\label{most pradtl}
\end{center}
\end{figure}
\end{document}
Code: Select all
! Package pgfkeys Error: I do not know the key '/tikz/legend pos' and I am going to ignore it.