1

Recently I discovered how to pass arguments to gnuplot, so I can do:

gnuplot -e "filename='../2038/data'; width='640'; height='480'" plot.plt

Where plot.plt:

set term png size width, height

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

set datafile separator ";"

set output filename.'_full.png'
plot filename.'.csv' using 1:3 w dots

set output filename.'.png'
set yrange [-0.1:3]
plot filename.'.csv' using 1:3 w dots

Then I tried to pass in the style:

gnuplot -e "filename='../2038/data'; width='640'; height='480'; style='w dots'" plot.plt

with plot.plt

set term png size width, height

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

set datafile separator ";"

set output filename.'_full.png'
plot filename.'.csv' using 1:3 style

set output filename.'.png'
set yrange [-0.1:3]
plot filename.'.csv' using 1:3 style

This time I was unsuccessful. How should I proceed?

Reference:

How to pass command line argument to gnuplot?

Concatenate 2 strings in gnuplot

Christoph
  • 47,569
  • 8
  • 87
  • 187
KcFnMi
  • 5,516
  • 10
  • 62
  • 136

0 Answers0