The commands exit and quit and the END-OF-FILE character will exit GNUPLOT. All these commands will clear the output device (as the clear command does) before exiting.
exit
quit
clear
Go to the first, previous, next, last section, table of contents.