Saturday, September 5, 2009

Create jpeg with gnuplot

Gnuplot allows you to create and save
a jpeg file too. All you need to ensure
is that you include the following two
lines as a part of the gnuplot code-
set terminal jpeg
set output filename.jpeg
The set terminal line helps to set the
terminal type while the second line
gives the name of the jpeg file to which
the plot is saved. Please ensure these lines
are included before the plot command
in the gnuplot script.


Anonymous said...

You forgot the ''
set output 'filename.jpeg'

But thanks a lot!

Anonymous said...

set terminal postscript jpeg color enhanced "Helvetica" 20
set output "plot.jpeg"
set title "{/Symbol y}"
set xlabel "PHI" font ",15"
set ylabel "PSI" font ",20"
set grid
set style data linespoints
plot [-2:30][-2:30]'C:\codeblock files\first attempt\output.txt'

I'm trying to create a jpeg file but for some annoying reason, it says jpeg is an undefined variable. It works perfectly fine if I replace it with
eps, but not jpeg. Can you tell me if the above command lines are even correct/any mistakes? I'm new to using Gnuplot.
Many Thanks

Post a Comment