Creates temporary file with file name formatted like /tmp/gnuplot_cmd_$(basename "${0}").XXXXXX.gnuplot and saves path to it in a variable 'gnuplotscript'.
gnuplotscript=$(mktemp /tmp/gnuplot_cmd_$(basename "${0}").XXXXXX.gnuplot)