#plot #parallel #data-file #gnuplot

app parallel-gnuplot

Parallel calls to GNUPlot. Calls the same GNUPlot script once for each data file block.

9 releases

Uses old Rust 2015

0.2.2 Jul 17, 2018
0.2.1 Jan 1, 2018
0.2.0 Dec 30, 2017
0.1.7 Dec 27, 2017

#435 in Science

27 downloads per month

MIT license

17KB
338 lines

parallel-gnuplot

Version info Build Status Build status

Parallel calls to GNUPlot. Calls the same GNUPlot script once for each data file block. Please, note GNUPlot has copyrights, and parallel-gnuplot is not a modified version of GNUPlot.

GNUPlot variables

parallel-gnuplot sets some GNUPlot variables:

  • INDEX: block index, starting at 0 if --initial was not set;
  • CONTINUOUSINDEX: block index, starting at 0;
  • DATAFILE: path of a data file containing only a single block.

Usage

parallel-gnuplot -d datafilename0 -d datafilename1 [-d ...] -g gpfilename

or

program_outputing_data | parallel-gnuplot -g gpfilename

or

cargo run --release -- -d datafilename0 -d datafilename1 [-d ...] -g gpfilename

Use flag -h for more help.

Example

data.txt:

# block 0:
0 0
1 1
2 2
3 3
4 4


# block 1:
0 0
1 2
2 4
3 6
4 8

script.gp:

set terminal png size 800,600
set encoding utf8

set xrange [0:4]
set yrange [0:8]

set key left top
set output sprintf("%d", INDEX).'.png'

plot DATAFILE0 with lp lw 2 pt 7 ps 3 title sprintf("Block %d", INDEX)

You can call: parallel-gnuplot -d data.txt --g script.gp or cargo run --release -- -d data.txt -g script.gp or something like cat data.txt | parallel-gnuplot -g script.gp

Features

  • Tested with the Operating Systems:
    • MS Windows (works since v0.1.4),
    • GNU/Linux.
    • (Let me know if works in other OSs.)
  • Can receive data through pipe (since v0.1.5).
  • Check vality of script (since v0.1.6).
  • Skip single line comments capability.

Dependencies

~0.9–1.2MB
~14K SLoC