plt文件可以使用gnuplot.exe打开,该软件是开源软件可随意在开源网站下载并运行。
使用记事本编写
plot sin(x)
并保存为“测试.plt”
使用gunplot打开如下图,若需要保存点击export即可。
如果有批量保存这类plt文件,可以使用记事本打开.pll文件在末尾添加:
set term pngcairo lw 2 font "AR PL UKai CN,14"
set output "precipitation.png" # 保存的文件名
replot
set output
set term wxt
exit # 如果需要退出则使用,否则 "#exit"屏蔽即可
此时,测试.plt 文件如下,并保存:
plot sin(x)
set term pngcairo lw 2 font "AR PL UKai CN,14"
set output "precipitation.png"
replot
set output
set term wxt
exit
再次使用gnuplot打开 “测试.plt”界面一闪而过后,在当前文件夹里出现名为“precipitation.png”的图片。
若有批量保存 “.plt”文件的需求,可以使用通用脚本语言如python,在文件末尾追加行内容,然后通过命令调用gnuplot程序,即可实现批量保存plt为png图片内容。