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)