title: Plotting graph in GNU PLOT using C#
body: <p>I have a dat file <code>insert.dat</code></p>
  
  <p>The contents are as follows:</p>
  
  <pre><code>1000    0.002322044 0.00291182
  5000    0.000103257 0.000458963
  10000   2.50E-05    0.000172019
  20000   6.18E-06    6.03E-05
  40000   2.51E-06    2.65E-05
  60000   1.65E-06    1.71E-05
  80000   1.21E-06    1.23E-05
  100000  1.01E-06    9.97E-06
  </code></pre>
  
  <p>When I open the <code>gnuplot.exe</code> and type plot <code>insert.dat</code> with lines, I get a proper output but when I write a C# code as follows:</p>
  
  <pre><code>private  void GNUPlot()
  {
      string pgm = @"E:\gnuplot\bin\gnuplot.exe";
  
      Process extPro = new Process();
      extPro.StartInfo.FileName = pgm;
      extPro.StartInfo.UseShellExecute = false;
      extPro.StartInfo.Standardization = true;
      extPro.Start();
  
      StreamWriter gnupStWr = extPro.StandardInput;
      gnupStWr.WriteLine("plot \"insert.dat\" with lines ");
      gnupStWr.Flush();
  }
  </code></pre>
  
  <p><strong>I get the following warning:</strong></p>
  
  <pre><code>warning: Skipping unreadable file "insert.dat"
  </code></pre>
  
  <p>When I replace  </p>
  
  <pre><code>gnupStWr.WriteLine("plot \"insert.dat\" with lines ");
  </code></pre>
  
  <p>with  </p>
  
  <pre><code>gnupStWr.WriteLine("plot sin(x) ");
  </code></pre>
  
  <p>I get the required <code>Sin(x)</code> graph output. </p>
  
  <p><code>insert.dat</code> is in the current directory of <code>gnuplot</code>. I want <code>insert.dat</code> file data to be plotted.</p>