How to pass command line argument to gnuplot?
You can input variables via switch -e $ gnuplot -e “filename=”foo.data”” foo.plg In foo.plg you can then use that variable $ cat foo.plg plot filename pause -1 To make “foo.plg” a bit more generic, use a conditional: if (!exists(“filename”)) filename=”default.dat” plot filename pause -1 Note that -e has to precede the filename otherwise the file … Read more