# Legend pos does not work [closed]

The following code does not compile. I use the following packages.

\documentclass[12pt]{article}
\renewcommand{\textheight}{620pt}
\renewcommand{\textwidth}{450pt}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{subfig}
\usepackage{pgfplots}
\usepgflibrary{shapes.geometric}

\begin{tikzpicture}
\begin{axis}[legend cell align=center,legend pos=outer north east]

Did you read the error message? It's missing \begin{document}... \end{document} :) – percusse Aug 23 '12 at 6:47
@user12290: In your example document, \begin{document}...\end{document} is missing. If I add that back in, the example compiles correctly (with the legend outside the top right corner of the plot). – Jake Aug 23 '12 at 6:54
For me your code snippet with the addition of \begin{document}...\end{document} works. – Claudio Fiandrino Aug 23 '12 at 6:54