From this answer How to scale existing coordinates data in pgfplots? I am using y filter to process data, all fine until I decide to put a legend entry in the plot. I cannot seem to simultaneously use the yfilter and the addlegendenty lines in the following code.
I get this error
! Illegal parameter number in definition of \pgfplots@curplotlist.
from this code (later try commenting the two lines):
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[
y filter/.code={\pgfmathparse{#1*10.}\pgfmathresult}% try comment
] coordinates {
( 1., 1. )
( 2., 2. )
( 3., 3. )
};
\addlegendentry{Legend Entry};% try comment
\end{axis}
\end{tikzpicture}
\end{document}
What is wrong, is this a bug?
info: pdfTeX 3.1415926-2.5-1.40.14 LuaTeX, Version beta-0.76.0-2013061217 (TeX Live 2013)

addlegendentryorder. It will break if other fancy stuff enters – percusse Sep 24 '13 at 07:44\addlegendentryhas to appear after the corresponding\addplotcommand? Do you have an example where things fail if you don't do that? It was my understanding that each\addplotcommand simply added its drawing style to a list, and each\addlegendentryadded its text to a different list, and at the very end, the two lists are combined to form the legend, so the order of\addplotand\addlegendentrywouldn't matter. – Jake Sep 24 '13 at 11:37