Instead of wasting a call to echo. Here-documents are in POSIX [1].
[1]: http://pubs.opengroup.org/onlinepubs/
9699919799/utilities/V3_chap02.html#tag_18_07_04
OUTFILE="./monfold.png"
ACTION="scp $OUTFILE einstein:./public_html/rsrch/monfold.png" # upload to web
-echo "set terminal png
+cat > "$GPFILE" <<EOF
+set terminal png
set output '$OUTFILE'
-plot '$DATALINK' using ((\$1/2**15-1)*10):((\$2/2**15-1)*10)" > "$GPFILE"
+plot '$DATALINK' using ((\$1/2**15-1)*10):((\$2/2**15-1)*10)"
+EOF
# The way output from the unfolding software works, we get a bunch of
# YYYYMMDDHHMMSS_unfold