I have a dat file insert.dat
The contents are as follows:
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
When I open the gnuplot.exe and type plot insert.dat with lines, I get a proper output but when I write a C# code as follows:
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();
}
I get the following warning:
warning: Skipping unreadable file "insert.dat"
When I replace
gnupStWr.WriteLine("plot \"insert.dat\" with lines ");
with
gnupStWr.WriteLine("plot sin(x) ");
I get the required Sin(x) graph output.
insert.dat is in the current directory of gnuplot. I want insert.dat file data to be plotted.
'insert.dat'instead?