I don't know much about cygwin, so I don't know what the default terminal is (or what terminals will be enabled).Ī few things to try: gnuplot -e 'plot "table.dat" u 1:2 pause -1' #this should leave your plot open until you hit returnĪnd then open the postscript using whatever tool you have for viewing postscripts - I often use gv, but I don't know what there is on cygwin. To learn about how to save it to a file, inside gnuplot do: help set term and help set output and set term. The -persist makes it so the plot stays on your screen (which you'll want since I doubt you're saving it to a file). using '-e' is the same thing as putting the stuff in singe quotes into a temporary file (call it temp.gp) and then doing gnuplot temp.gp. 'table.dat' doesn't have commands to run, it has data to be plotted. Gnuplot is able to generate a graphic from a script file which allows for a sequence of commands necessary to draw a graphic to be executed in sequence instead of type in manually. With your command, gnuplot is looking for commands to run in a file called 'plot' and then in a file called 'table.dat'. I also tried to set the persistent option in gnuplot directly with: a) set terminal wxt persist. If you want to leave a plot window open and fully mouseable after creating the plot, for example when running gnuplot from a script file rather than interactively, see pause mouse close.You probably want: gnuplot -persist -e 'plot "table.dat" u 1:2' under windows (xp) the '-persist' option for gnuplot.exe ist not working - if I start 'gnuplot.exe -persist', create a plot and 'exit' gnuplot again, the plotting window is closed, too. If youre using the x11 terminal, the plots disappear immediately after gnuplot exists (which is. However operations like zoom/unzoom that require redrawing the plot are not possible because the main program has exited. For example, if youre using the aqua terminal, the plots will persist after gnuplot exits. From the help The xlib terminal driver supports the X11 Windows System. set term qt persist size 700,500ĭepending on the terminal type, some mousing operations may still be possible in the persistent window. the gnuplot x11 terminal uses a separate program called gnuplotx11 for displaying the results. You can also specify persist or nopersist when you set a new terminal. ) open separate display windows on the screen into which plots are drawn. Gnuplot will open a display window, draw the plot into it, and then exit, leaving the display window containing the plot on the screen. Gnuplot Persist Persist Many gnuplot terminals (aqua, pm, qt, x11, windows, wxt. For example if you issue the command gnuplot -persist -e 'plot sinh(x)' Share Improve this answer Follow answered at 15:31 Quasmodo 18. It has no effect on non-interactive terminal output. gnuplot -persist -e 'plot 'file1.dat' pause mouse close' As you already know, you can now use Ctrl-WheelUp and Ctrl-WheelDown to zoom, as well as selecting a rectangular area with the right button, as disclosed in the Scrolling and Zoom sections of the manual. The persist option tells gnuplot to leave these windows open when the main program exits. The options persist and raise are unset by default, which means that the defaults (persist no and raise yes) or the command line options -persist / -raise or the Xresources are taken. Persist Many gnuplot terminals (aqua, pm, qt, x11, windows, wxt. Plot windows will automatically be closed at the end of the session unless the -persist option was given.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |