# How can I change the legend's location in a pgfplot?

For a report I am preparing several figures that I exported from Matlab using the matlab2tikz script. However, the location of the legend does not please me. Here is an example plot:

I want to move the legend into the bottom right (souh east) corner. I tried doing this applying the command legend pos=south east as explained in the pgfplots manual, page 117. However, this does not change anything but rather delivers a finished with exit code 1 message.

Did anything change unnotedly in the pgfplots package? Or how do I properly move the legend?

Minimal example that produces exit code 1:

\documentclass{scrartcl}

\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[%
scale only axis,
width=0.45\textwidth,
height=0.2\textheight,
xmin=0, xmax=300,
ymin=-2e+06, ymax=1e+07,
legend entries={Analytic solution,GPS data,Kalman filtered},
legend style={nodes=right},
legend pos= south east]

coordinates{ (0,7e+06) (0.1,7.0007e+06) (0.2,7.0014e+06) };

coordinates{ (0,6.99999e+06) (0.1,7.00071e+06) (0.2,7.00143e+06) };

coordinates{ (0,0) (0.1,7.00071e+06) (0.2,7.00174e+06) };

\end{axis}
\end{tikzpicture}

\end{document}

-
Works without problems for me (but the x axis range is wrong). –  Philipp Oct 14 '10 at 8:54
Does it display the legend in the bottom right corner? It definitely does not work in my machine. The x-axis range might be wrong but is not in the real case. I just removed a lot of data for this minimal example –  Ingo Oct 14 '10 at 10:48
Also works on my system, and the legend does show up in the bottom right corner. Maybe you could try clearing aux files? updating your TeX installation? –  Juan A. Navarro Oct 14 '10 at 13:24
I use TeXLive2009 and cleared all my .aux fles :(. This is extremely weired. Maybe some bad interaction with other packages? –  Ingo Oct 14 '10 at 14:19
Update: I just tried to compile one of the examples from the manual. Does not work! This is extremely strange. I use a fresh installation of TeXLive2009 from the package manager in Ubuntu. Probably this question should be closed because it seems to be a specific probkem. –  Ingo Oct 14 '10 at 14:41