I am using the following commands to draw a simple sin(x) plot on gnuplot , with a pipe from VS2010 C++
set terminal windows
set title 'Graph of velocity versus time'
set xrange[0:10]
plot sin (x)
Problem is the window keeps closing down too quickly . I don’t want to use the ‘pause’ command as it stop the entire code.
Is there any other way to keep this window open without the pause command?
Cheers
I cant try it, but have you tried
The problem is that the command you set via your pipe is probably executed via cmd.exe which exits as soon as gnuplot return 1 (which is totally does after successful plot). With this the instance of the window is destroyed as well.