当我在 gnuplot 窗口中输入以下内容时:
set xlabel "x"; set ylabel "y";
plot "rk1000.dat" with lines, "teor1000.dat" with lines
Run Code Online (Sandbox Code Playgroud)
结果是一个不错的情节。但是,当我尝试将其另存为 .png 文件时,结果不太好。打字后
set xlabel "x"; set ylabel "y"; set terminal png size 800,600;
plot "rk1000.dat" with lines, "teor1000.dat" with lines
Run Code Online (Sandbox Code Playgroud)
结果是 gnuplot 吐出垃圾字符并且什么也不做。这是一个屏幕截图:
我该如何解决?就在一个小时前,我保存我的地块也没有任何问题。
您可以set output在脚本中使用 gnuplot 将输出重定向到文件:
set terminal png size 800,600
set output "plot.png"
plot "rk1000.dat" with lines, "teor1000.dat" with lines
Run Code Online (Sandbox Code Playgroud)
如果您使用 gnuplot 创建 png 图像,“pngcairo”终端会产生更好看的结果。尝试set terminal查看可用终端的列表。
| 归档时间: |
|
| 查看次数: |
1116 次 |
| 最近记录: |