title: How to pass command line argument to gnuplot?
body: <p>I want to use gnuplot to draw figure from data file, say <em>foo.data</em>. Currently, I hardcoded the data file name in the command file, say <em>foo.plt</em>, and run command <code>gnuplot foo.plg</code> to plot data. However, I want to pass the data file name as a command argument, e.g. running command <code>gnuplot foo.plg foo.data</code>. How to parse the command line arguments in gnuplot script file? Thanks.</p>