[求助 ]
vb.net调用gnuplot并且load参数文件
用vb.net调用gnuplot这个软件并且能够让它load ‘.\experiment-3\Rjhplot.plt’文件。
在gnuplot中load ‘.\experiment-3\Rjhplot.plt’没有问题,但是如果从vb.net中调用就不能够进行,我可以单独打开gnuplot这个应用程序但是不能够调用任何配置文件,提供代码如下:CODE: Dim gnu As New ProcessStartInfo(Application.StartupPath & ".\gnuplot\bin\gnuplot.exe")
With gnu
gnu.Verb = "load"
gnu.Arguments = ".\experiment-3\Rjhplot.plt"
gnu.FileName = ".\experiment-3\Rjhplot.plt"
gnu.RedirectStandardError = True
gnu.RedirectStandardOutput = True
gnu.UseShellExecute = False
gnu.CreateNoWindow = False
End With
Dim g As Process = Process.Start(gnu)
Dim gOutput As String = g.StandardOutput.ReadToEnd()
Dim gError As String = g.StandardError.ReadToEnd()
g.WaitForExit()
配置文件内容如下:
set key off
set xlabel "t (min)" offset 0,1 font 'Times,11'
set ylabel "T (K)" offset 3,0 font 'Times,11'
set title "T-t Graph for Renald Correction" offset 0,-0.5 font 'Times,14'
set decimalsign "."
set format x "%.2f"
set format y "%.2f"
set xtics offset 0,0.5
plot "Rjhdata.txt" using 1:2 with linespoints linetype -1
[ Last edited by jjdg on 2012-11-11 at 01:09 ]