passing parameters to a gp 'program'

passing parameters to a gp 'program'

Post by giacomo boff » Thu, 12 Feb 1998 04:00:00

i have devised this kludge, in i have:

soil=`echo $soil`

and i launch gnuplot from {,k,ba}sh like this:

% soil=3 gnuplot


it works also with filenames, e.g., if in i have

set out `echo $file`

and launch gnuplot like this:

% file=\"\" gnuplot

a file `' is written


while it works, my method seems to me very kludgy... what i'd really
like in gp36 is a supported method to pass parameters values

% gnuplot -p soil=3

avoiding the soil=`echo $soil` in my programs

now that i'm daydreaming, if i had the above, i'd like also a
conditional assignment operator, to assign a default value to a
parameter if it is not set on the shell command line

thank you for your attention


1. 'using' combined with running parameter


I am trying to draw scatter plot (x/y) with the size of the
points/bubbles due to a third columns (z).
The following plot command does not work (gnuplot says undefined t).
Has anybody a better idea???

plot [t=0:2*pi] 'test gnu\foo2.txt' using (($1) +($3)*cos(t)):(($2)+($3)

Best ragards,

Sent via
Before you buy.

2. looking for tubes with grass blades.....

3. Passing 'Application.Icon' to a DLL

4. Set up failure 213

5. ********New Year's sale of programs*****New Year's sale of programs******************

6. Compression Codecs

7. motion study - showing body phases?