You'll probably want to add
bind all "alt-End" "exit gnuplot"
pause mouse close
after the plot command, and not use the persist option, so that the window exists (and pclose() blocks) until the user closes the window (by using the window close button, Ctrl-Q, or Alt+F4).