Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1456 > unrolled thread

parameter file

Started byzetras@gmail.com
First post2012-10-30 22:28 +0100
Last post2012-11-03 19:06 +0100
Articles 3 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  parameter file zetras@gmail.com - 2012-10-30 22:28 +0100
    Re: parameter file "Alex van der Spek" <zdoor@xs4all.nl> - 2012-11-03 15:52 +0100
      Re: parameter file zetras@gmail.com - 2012-11-03 19:06 +0100

#1456 — parameter file

Fromzetras@gmail.com
Date2012-10-30 22:28 +0100
Subjectparameter file
Message-ID<87y5in8xa0.fsf@kerstf.org>
I've got two files. One has the data and the other has some parameters
describung the data:

data.txt
134
156
112
...

param.csv
"Title";-10;10;s;0;200;kg

I would like to include these values to e.g. title, xmin, xmax, xunit,
ymin, ymax and yunit for further calculations in the plot.

Is this possible? Where should I start reading? Are there any examples?

Thanks!

[toc] | [next] | [standalone]


#1461

From"Alex van der Spek" <zdoor@xs4all.nl>
Date2012-11-03 15:52 +0100
Message-ID<50952f9e$0$6913$e4fe514c@news2.news.xs4all.nl>
In reply to#1456
Use 'load "param.txt"' to load your parameters. The "param.txt' file is:

Title = 'Title'
xmin = -10
xmax = 10
xunit = 'kg'

Then call your plotscript 'foo.plt'.

call 'foo.plot' 'param.txt' 'data.txt'

with the plotscript something like:

load '$0'

set title Title
set xrange [xmin:xmax]
set xlabel xunit
plot '$1' using 1:2 with linespoints


The load loads your parameter file. Everthing in there should be normal 
gnuplot commands or declarations of parameters or functions. The call runs 
the script using 2 command line parameters which are substituted in the 
script as $0 and $1.

Good luck,
Alex van der Spek




<zetras@gmail.com> wrote in message news:87y5in8xa0.fsf@kerstf.org...
> I've got two files. One has the data and the other has some parameters
> describung the data:
> 
> data.txt
> 134
> 156
> 112
> ...
> 
> param.csv
> "Title";-10;10;s;0;200;kg
> 
> I would like to include these values to e.g. title, xmin, xmax, xunit,
> ymin, ymax and yunit for further calculations in the plot.
> 
> Is this possible? Where should I start reading? Are there any examples?
> 
> Thanks!

[toc] | [prev] | [next] | [standalone]


#1463

Fromzetras@gmail.com
Date2012-11-03 19:06 +0100
Message-ID<87zk2yblxo.fsf@kerstf.org>
In reply to#1461
> The load loads your parameter file. Everthing in there should be
> normal gnuplot commands or declarations of parameters or
> functions. The call runs the script using 2 command line parameters
> which are substituted in the script as $0 and $1.

In the meantime I have choosen another path. I generated the whole
Gnuplot file with a shell script. The splitting is done with `awk -F\;
"{print...}"' and every parameter generates a new variable. Then Gnuplot
can do all the calculations necessary for the plot. Works like a charm.

Thank you for your suggestions anyway and all the people contributing to
Gnuplot. It's a wonderful project!

-- 
zetras
while(!(success=try()));

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web