Gnuplot在试图保存图片时显示垃圾
当我在gnuplot窗口中输入以下内容时:Gnuplot在试图保存图片时显示垃圾,gnuplot,Gnuplot,当我在gnuplot窗口中输入以下内容时: set xlabel "x"; set ylabel "y"; plot "rk1000.dat" with lines, "teor1000.dat" with lines 结果是一个很好的情节。但是,当我试图将其保存为.png文件时,结果就不太好了。打字后 set xlabel "x"; set ylabel "y"; set terminal png size 800,600; plot "rk1000.dat" with lines, "
set xlabel "x"; set ylabel "y";
plot "rk1000.dat" with lines, "teor1000.dat" with lines
结果是一个很好的情节。但是,当我试图将其保存为.png文件时,结果就不太好了。打字后
set xlabel "x"; set ylabel "y"; set terminal png size 800,600;
plot "rk1000.dat" with lines, "teor1000.dat" with lines
结果是gnuplot吐出垃圾字符而什么也不做。以下是一个屏幕截图:
我该如何解决这个问题?不到一小时前,我保存绘图时没有问题。只需将输出保存到png文件:
gnuplot script.gp > picture.png
如果您想了解更多信息,请在web上搜索“重定向”。只需将输出保存到png文件:
gnuplot script.gp > picture.png
如果您想了解更多信息,请在web上搜索“重定向”。您可以在脚本中使用
set output
使gnuplot将输出重定向到文件:
set terminal png size 800,600
set output "plot.png"
plot "rk1000.dat" with lines, "teor1000.dat" with lines
如果您使用gnuplot创建png图像,“pngcairo”终端会产生更好的效果。尝试
set terminal
查看可用终端的列表。您可以在脚本中使用set output
使gnuplot将输出重定向到文件:
set terminal png size 800,600
set output "plot.png"
plot "rk1000.dat" with lines, "teor1000.dat" with lines
如果您使用gnuplot创建png图像,“pngcairo”终端会产生更好的效果。尝试设置终端以查看可用终端的列表。应先绘制,然后设置终端 前 “绘图'../log/test_coverage.${atpg_mode}.log.tmp'title'Ori atpg'w lp lt 3 pt 9” “设置终端png字体\”/usr/share/fonts/libration/librationserif Italic.ttf \“9”;#将图像另存为png格式 “设置终端png尺寸1000、800”;#将图像大小保存为800*1000 “设置输出'${REPORT\u DIR}/Test\u Coverage\u Curve.'${atpg\u mode}.png'”
“replot”您应该先绘图,然后设置术语 前 “绘图'../log/test_coverage.${atpg_mode}.log.tmp'title'Ori atpg'w lp lt 3 pt 9” “设置终端png字体\”/usr/share/fonts/libration/librationserif Italic.ttf \“9”;#将图像另存为png格式 “设置终端png尺寸1000、800”;#将图像大小保存为800*1000 “设置输出'${REPORT\u DIR}/Test\u Coverage\u Curve.'${atpg\u mode}.png'”
“replot”这不是垃圾,而是应该保存到文件中的图像内容,而不是打印到终端上。那么,为什么同样的命令适用于上一个绘图,而不适用于此绘图?这对我来说太奇怪了。这不是垃圾,而是图像的内容,你应该保存到一个文件中,而不是打印到终端上。那么为什么同样的命令适用于之前的绘图,而不是这个绘图?这对我来说太奇怪了。