最近我发现了如何将参数传递给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
这次我没有成功。我该怎么办?
参考: