I have multiple data files (result_a.csv, result_b.csv, ..) and I want to create plot for each one (result_a.pdf, result_b.pdf - or similar). The plot is the same but the input file is different and the output file is different. Is there a way I can run a loop, pass the parameter names from the outside and save the output with a distinctive name?
Assume that my code for creating the plot -
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{ytick style={draw=none}, xtick style={draw=none}}
\usetikzlibrary{patterns}
\newcommand\param{a}
\begin{document}
\begin{tikzpicture}
\footnotesize
\begin{semilogxaxis}
\addplot[color=red,mark=triangle] table [x=x,y=y,col sep=comma, mark=*] {result_\param.csv};
\end{semilogxaxis}
\end{tikzpicture}
\end{document}