|
From: Tatsuro M. <tma...@ya...> - 2015-06-14 07:34:26
|
----- Original Message ----- > From: Tatsuro MATSUOKA > To: tmacchant3 gnuplot-info > Cc: > Date: 2015/6/14, Sun 15:35 > Subject: Re: [Gnuplot-info] passing an argument to gnuplot script > > ----- Original Message ----- > >> From: tmacchant >> To: gnuplot-info >> Cc: >> Date: 2015/6/13, Sat 04:49 >> Subject: Re: [Gnuplot-info] passing an argument to gnuplot script >> >>> #!/bin/bash >>> set xlabel "start" >>> set ylabel "Delay" >>> set autoscale >> >> You are confusing gnuplot script and bash shell command. >> >> #!/bin/bash declare that this file is bash shell script. You cannot write >> gnuplot command in bash shell script. >> >> Tatsuro >> > > The below examples are not strictly passing the arguments but practically do the > similar thing. > > #test.gp > plot a*x+b > #end of test.gp > > $ echo "a=2;b=3;load 'test.gp'" | gnuplotcvs --persist > or > $ gnuplot -e "a=2;b=3;load 'test.gp'" --persist > > The idea is taken from the octave-ML. > > http://octave.1599824.n4.nabble.com/Pass-argument-to-script-file-td4670853.html > > HTH > > Tatsuro Using call command on gnuplot version 5 or later #calltest.gp plot ARG1*x+ARG2 $ gnuplot -e "call 'calltest.gp' 2 3" --persist HTH Tatsuro |