|
From: Koto N. <kot...@gm...> - 2006-07-01 01:17:05
|
Hi,
I'd like to call wgnuplot from C#. First I made a file by using
"save" command. That file has some commands for wgnuplot.
Next I wrote the C# code as:
Process.Start("wgnuplot.exe", "load 'command.gp'");
But it doesn't show me anything.
Does anyone has idea?
As a reference, I could call wgnuplot by the code:
Process.Start("wgnuplot.exe");
I would like to let wgnuplot do the sequence of the command.
I asked this question to the gnuplot people, not .NET people (yet)
because I think the command of DOS window will work for
Process.Start() function of C#.
>From DOS window, if I type:
wgnuplot.exe, load 'command.gp'
but this also doesn't work. So I guess if I could know how to type in
DOS window to make wgnuplot do some commands, I also could call the
above C# command. If anyone has an advice, please let me know.
Thank you very much,
Koto
|
|
From: <br...@ph...> - 2006-07-02 10:27:28
|
Koto Norose wrote:
> Process.Start("wgnuplot.exe", "load 'command.gp'");
>
> But it doesn't show me anything.
Of course it doesn't. I'm somewhat at a loss how you arrived at the
idea it should, given that you already found out that
>>From DOS window, if I type:
>
> wgnuplot.exe, load 'command.gp'
>
> but this also doesn't work.
Failure to RTFM. "help introduction" would have explained that.
|
|
From: Koto N. <kot...@gm...> - 2006-07-12 01:01:39
|
Yes, needless say, I would like to show what you said.
In short, I wrote:
I cannot use the command Process.Start("wgnuplot.exe", "load
'command.gp'"); in C#.
The proof is wgnuplot.exe, load 'command.gp' in DOS window doesn't work.
So please let me know how to type in DOS window to make wgnuplot do
some commands.
Please read carefully. I didn't talk the first two lines above separately.
Now I"m thinking that I will change the source code of wgnuplot to
take an argument. Does anyone know where should I get the source
code?
Thank you very much,
Koto
P.S. I wrote this message again since I need to post the message to
the list also. Sorry about this round for you, Hans...
|
|
From: Roberto B. <rba...@uo...> - 2006-07-12 04:54:27
|
Koto Norose wrote:
> I cannot use the command Process.Start("wgnuplot.exe", "load
> 'command.gp'"); in C#.
> The proof is wgnuplot.exe, load 'command.gp' in DOS window doesn't work.
> So please let me know how to type in DOS window to make wgnuplot do
> some commands.
Dear Koto,
To launch a batch session of gnuplot using a command file "command.gp"
from a command prompt
wgnuplot.exe command.gp
See also
help batch
Regards,
Roberto
|
|
From: Koto N. <kot...@gm...> - 2006-07-12 05:50:39
|
Dear Roberto,
Thank you millions.
You fixed every problem I faced. I spend very hard time to solve this
problem so I really appreciate you.
As a feed back for the future developer like me, let me write what I did.
>From C# call wgnuplot with command file as following:
Process.Start("wgnuplot.exe", "command.gp");
Also in the command.gp file is made by following. This was done at
the wgnuplot command line.
plot "data.txt" using 1:3 title "testline" with linesp
set terminal png size 320, 240
set output "picture.png"
replot
set output
set terminal windows
save "command.gp"
Where data.txt is a file contains data, picture.png is a png file that
shows the plot of data's first colomn vs third colomn, and command.gp
has all commans above except the last line.
So when I run at the DOS window as:
wgnuplot command.gp
Then I could get the picutre.png at the working directory without any
input at the command line of wgnuplot.
When the C# command runs, then I could get the picture.png file. This
is very nice for C# since it could use the wgnuplot functions and use
the result.
Thank you very much again Roberto, now I can move on.
Regards,
Koto
On 7/11/06, Roberto Baginski <rba...@uo...> wrote:
> Koto Norose wrote:
>
> > I cannot use the command Process.Start("wgnuplot.exe", "load
> > 'command.gp'"); in C#.
> > The proof is wgnuplot.exe, load 'command.gp' in DOS window doesn't work.
> > So please let me know how to type in DOS window to make wgnuplot do
> > some commands.
>
> Dear Koto,
>
> To launch a batch session of gnuplot using a command file "command.gp"
> from a command prompt
>
> wgnuplot.exe command.gp
>
> See also
>
> help batch
>
> Regards,
> Roberto
>
|