I am trying to run a \pgfplotsinvokeforeach
loop in a \foreach
loop to plot the variables
var1_roll1 - var1_roll10 in one plot and var2_roll1 - var2_roll10 in another.
Both loops work fine individually but a combination of both gives the following error:
! Illegal parameter number in definition of \pgffor@body.
Can anyone help? Here is the Code. Thanks!
\begin{figure}
\foreach \dt in {1,2} {
\begin{tikzpicture}
\begin{axis}[]
\pgfplotsinvokeforeach {1,2,...,10} {
\addplot[] table[x=x,y=var\dt_roll#1] {../plot/test.txt};
}
\end{axis}
\end{tikzpicture}
}
\end{figure}
\documentclass{...}
and ending with\end{document}
.