Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use same plot script for Gnuplot of multiple files.

657 views
Skip to first unread message

Sudip Roy

unread,
Apr 13, 2012, 10:27:14 AM4/13/12
to
I have 6000 files in same format. I have a plot script that can plot
the graph taking data from one single file abc.dat and saves the plot
in abc.eps file.

Now I want to use the same plot script to plot for all the 6000 data
files into 6000 eps files. Is there any way/technique to pass the two
file names <input.dat> and <output.eps> into the same plot script as
command line arguments? Or in any other this can be done?

Thanking you in advance.
Regards,
Sudip

Christoph Bersch

unread,
Apr 13, 2012, 10:47:27 AM4/13/12
to
gnuplot -e"infile='input.dat';outfile='output.eps';" script.gp

Christoph

Michael

unread,
Apr 13, 2012, 8:44:29 PM4/13/12
to
13.04.2012 21:27, Sudip Roy пишет:
I have the similar problem with 100s of plots. I solve it with perl
scripts that create gnuplot scripts for each data set. These gnuplot
files are executing, then I have another perl script that creates LaTeX
file, builds pdf and... report is done :)

sam

unread,
Oct 10, 2012, 8:03:37 PM10/10/12
to
That seems great but what is this perl script and how would be the second one?
please guide me .
Sama

Alex van der Spek

unread,
Oct 11, 2012, 1:23:41 PM10/11/12
to
your plot script should contain command line substitution parameters ($0,
$1 and so forth, maximum of 10) like so:

+++++
set out '$1'
plot '$0
+++++

then call the script with call from the gnuplot

call 'yourplotscript.gp' 'filetoplotfrom.dat' 'filetoplotto.eps'

Good luck,
Alex van der Spek


"sam" <samj...@gmail.com> wrote in message
news:b8e8a2d7-1a67-4226...@googlegroups.com...
On Saturday, April 14, 2012 2:44:29 AM UTC+2, Michael wrote:
> 13.04.2012 21:27, Sudip Roy ?????:
0 new messages