I created gnuplot , but the problem is that it disappears right away. I tried different solutions offered in other threads, but none of them worked. Solution 1: comment out the line bf.append("quit").append(NL); in the GNUPlotParameters.java file. Solution 2: put the line gp.setPersist(true); to gp.plot(); .
DataSetPlot plotdata = new DataSetPlot(Xvals); plotdata.setTitle(""); GNUPlot gp = new GNUPlot("C:\\Program Files (x86)\\gnuplot\\bin\\pgnuplot.exe"); gp.addPlot(plotdata); gp.plot(); gp.setPersist(true);
So how to solve this problem?
PS I am running this code on Windows 7.
source share