如何从CLI调用gnuplot并将输出图形保存到图像文件? [英] How to call gnuplot from CLI and save the output graph to the image file?
本文介绍了如何从CLI调用gnuplot并将输出图形保存到图像文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个批处理文件,该文件还将从dat文件生成gnuplot图.
I'm writing a batch file which will also generate a gnuplot graph from a dat file.
我希望使用我编写的gnuplot"gnu"脚本从命令行调用gnuplot,并将输出图形保存到图像中.
I wish to call gnuplot from the command line, using the gnuplot "gnu" script I have written, and save the output graph to an image.
类似的东西:
gnuplot.exe script.gnu > image.png
有什么想法吗?
推荐答案
简单地放置以下行将使gnuplot返回png格式的字节码.因此,您可以将输出重定向到png文件.
Simply putting the following line will make gnuplot to return png-format bytecode. Thus, you can redirect the output to a png-file.
set terminal png
这篇关于如何从CLI调用gnuplot并将输出图形保存到图像文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文