问题
I have to create program can plot 3D graph from text file. Now, I can write the code for plot 3D graph. but i have no idea to call gnuplot in vb.net. My program is written on window apps. So, i try to search code in the Internet.
and i find this:
http://classes.bus.oregonstate.edu/ba371/lu/VBlabs/VBgnuplot.html
I have already tried this code by console but it doesn't work. Although, It can work. I cannot resolve it to use with window apps. because I'm new in vb.net.
I have to write this program finish within 1 week. Anyone can help me? pls. Thanks in advance.
回答1:
In vb we can use the Shell Function. I am basing this on the below link. My escape sequence for the quotes may need to be adjusted but this should work. I have also included a link to the shell function which also has a code example using Process a well.
SHELL("gnuplot -e """filename='foo.data'""" foo.plg")
How to pass command line argument to gnuplot?
http://msdn.microsoft.com/en-us/library/xe736fyk(v=vs.90).aspx
Good luck.
来源:https://stackoverflow.com/questions/19472473/how-to-call-gnuplot-in-vb-net