调用Gnuplot传递样式作为参数

时间:2017-06-19 22:32:31

标签: plot gnuplot

最近我发现了如何将参数传递给gnuplot,所以我可以这样做:

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

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

然后我尝试传递风格:

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

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

这次我没有成功。我该怎么办?

参考:

How to pass command line argument to gnuplot?

Concatenate 2 strings in gnuplot

0 个答案:

没有答案