title: why gnuplot does not plot after fit?
body: <p>I am trying to fit a linear curve, and then plot the graph with the fitted line as well. However, the following does not work, as gnuplot makes a 0 kbyte .png output.</p>
  
  <pre><code>set t push
  set term png
  fit f(x) "NET_OUTPUT.dat" u 1:2 via a,b 
  plot "NET_OUTPUT.dat" using 1:2 with points, f(x) 
  unset output
  set term pop
  </code></pre>
  
  <p>If the fit line is not included, I can plot without problem.
  I suspect that the problem is that the fit.log file is written, and the gnuplot does not finish the writing of the output file. </p>
  
  <p>Does somebody know what is the problem?
  Thanks a lot!</p>