Tell me more ×  I'm writing a batch file which will also
generate a gnuplot graph from a dat file. I wish to call gnuplot
from the command line, using the gnuplot "gnu" script I have
written, and save the output graph to an image.  Something like:
gnuplot.exe script.gnu > image.png  Any ideas?  share|improve
this question add comment  3 Answers  up vote 2 down vote
accepted  Simply putting the following line will make gnuplot to
return png-format bytecode. Thus, you can redirect the output to
a png-file.  set terminal png share|improve this answer or, if
you have cairo enabled terminals and you want to make a nicer
looking plot: set terminal pngcairo :) –  mgilson Jan 2 at 20:35
add comment  When your batch file runs gnuplot only (with the
script) and does nothing else, then you can combine the batch
file with the gnuplot script:  @echo off & call gnuplot -e
"echo='#';set macros" "%~f0" & goto :eof  set terminal png set
output 'image.png'  Save this with .cmd extension. The
advantages of this is that:    • y