How to present a plot and then return to cmd prompt
I have a data file, and a gnu file, in which my plotting commands are.
How can I produce a plot in gnuplot, in a way that I call gnuplot giving it a name开发者_JAVA百科 of the gnu file ... it gives me the window with a plot ... and after I close it, it returns me not to gnuplot command prompt, but to cmd (windows cmd.exe) command prompt ?
There's 3 solutions for this problem (for producing persistent plots) when starting gnuplot from a script (using gnuplot script.gnuplot
).
- Use a
pause -1
at the end of your gnuplot script (after the plot), such that a user needs to press enter before gnuplot destroys the window with the plot - Use
gnuplot script.gnuplot -
to go into gnuplot's interactive mode after the script has completed - Use the
-persist
command line option to create a persistent plot window
精彩评论