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]
\addplot [color=blue, solid]
coordinates{ (0,7e+06) (0.1,7.0007e+06) (0.2,7.0014e+06) };
\addplot [color=green, solid]
coordinates{ (0,6.99999e+06) (0.1,7.00071e+06) (0.2,7.00143e+06) };
\addplot [color=red, solid]
coordinates{ (0,0) (0.1,7.00071e+06) (0.2,7.00174e+06) };
\end{axis}
\end{tikzpicture}
\end{document}