如何在gnuplot中不按Enter进行绘图 [英] How to plot without pressing enter in gnuplot

查看:54
本文介绍了如何在gnuplot中不按Enter进行绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的无头gnuplot在没有X的情况下也能很好地工作,但是问题是它要求我在每个绘图后按Enter键,因此我无法在脚本中进行多个绘图,当我尝试时它们不会生成无需按Enter键即可完成操作(例如,使用fork).

I'm using a headless gnuplot working great without X, but the problem is that it asks me to press enter after each plot so I can't do multiple plots in a script, they just don't generate when I try to do them without being able to press enter (with fork for example).

如何在不要求用户按Enter的情况下无情地绘图?

How can I plot headlessly without asking for the user to push enter?

推荐答案

最终编辑:问题实际上是我使用了错误的gnuplot二进制文件.即使没有人按下,它也可以无头"地工作.因此,无需导出GNUTERM.请参阅我的其他问题,以获取有关gnuplot二进制文件的更多详细信息.

Final edit: The problem was actually that I was using the wrong gnuplot binary. It works "headlessly" fine even with no one there to press confirm. So no need to export GNUTERM. See my other question for more details on the gnuplot binary.

旧答案:

export GNUTERM=dumb

这告诉gnuplot不要询问用户任何事情,而是运行它.我认为默认情况下应该启用它,但无论如何.我在运行脚本之前设置了这个env变量,它们现在就在不要求输入的情况下运行.

This tells gnuplot not to ask the user for anything and just run. I think it should be on by default but whatever. I set this env variable before running my scripts and they just run now without asking for input.

虽然它解决了问题,但似乎并没有按照我说的去做.显然,这只是告诉gnuplot以ASCII格式绘制?它仍然输出我的png.

while it solved the problem, it seems like this doesn't actually do what I'm saying it does. Apparently this just tells gnuplot to plot in ASCII format? It still outputs my pngs though.

双重可能全部是由于实际上使用了错误的gnuplot二进制文件.

Double edit: It may have been all due to using the wrong gnuplot binary actually.

这篇关于如何在gnuplot中不按Enter进行绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆