Pause mouse close

The command pause mouse close is a specific example of pausing to wait for an external event. In this case the program waits for a "close" event from the plot window. Exactly how to generate such an event varies with your desktop environment and configuration, but usually you can close the plot window by clicking on some widget on the window border or by typing a hot-key sequence such as 4#4alt5#54#4F45#5 or 4#4ctrl5#5q. If you are unsure whether a suitable widget or hot-key is available to the user, you may also want to define a hot-key sequence using gnuplot's own mechanism. See bind (p. [*]).

The command sequence below may be useful when running gnuplot from a script rather than from the command line.

    plot <...whatever...>
    bind all "alt-End" "exit gnuplot"
    pause mouse close