0

I have a set of directories (dir1, dir2, dir3, ...) containing data files (data.csv).

I would like to plot that data using Gnuplot. So I composed the following script:

set term png # size 1024,480

set xlabel "time"
set ylabel "corrected value"

set xdata time
set timefmt '%Y-%m-%d %H:%M:%S'
set format x "%Y"

set datafile separator ";"


set output "data_full.png"
      plot "data.csv" using 1:3 w p

set yrange [-0.1:3]
set output "data.png"
      plot "data.csv" using 1:3 w p

Instead of having multiple copies of this script (for each target directory) how to manage things so that I can have just one script to which I pass the target filename.

No problem if someone comes with a Python solution to deal with this script.

KcFnMi
  • 5,516
  • 10
  • 62
  • 136

0 Answers0