Simple scatter plot in gnuplot

I can never recall the code to do a scatter plot in gnuplot. So here it is for reference:

1
2
3
4
5
6
7
8
set size square
 
set ylabel "YLabel"
set xlabel "XLabel"
 
set terminal postscript eps color
set output "plot.eps"
plot "data" using 1:2 with points

This creates an eps file called plot.eps from a file called data. The file should contain 2 columns, the first being the x axis and the second the y.

Leave a Reply