GNUPlot disappears immediately after its creation

[亡魂溺海] 提交于 2019-11-29 11:24:19

Unfortunately this seems to be a bug in gnuplot under windows. See this bug report.

If you want this type of functionality, you have two options:

  1. use CygWin version of gnuplot
  2. save the result to a file, or use the JPlot swing component.

EDIT: There is a new version of JavaPlot which should fix this issue.

Look into the -persist option to pass to gnuplot, you could probably change the third line in your code to

GNUPlot gp = new GNUPlot("C:\\Program Files (x86)\\gnuplot\\bin\\pgnuplot.exe -persist");

or

GNUPlot gp = new GNUPlot("C:\\Program Files (x86)\\gnuplot\\bin\\pgnuplot.exe /noend");

Here is my source.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!