I'm having an issue with pgfplots/tikz when trying to change the font size for legends/nodes. Any command that contains "font=\size" fails (for example, "font=\small") with the error "Undefined control sequence \end{axis}".
Here is a MWE.
\documentclass[]{minimal}
\usepackage{paralist,pst-func, pst-plot, pst-math, pstricks-add,pgfplots}
\usetikzlibrary{patterns,matrix,arrows}
\pgfplotsset{compat=1.9}
\begin{document}
\begin{tikzpicture}
%\tikzstyle{every node}=[font=\small] % throws "Undefined control sequence \end{axis}"
\begin{axis}
%[legend style={font=\tiny}] % throws "Undefined control sequence \end{axis}"
\addplot[blue, ultra thick] (x,x*x);
\addlegendentry{ Class 1};
\end{axis}
\end{tikzpicture}
\end{document}