Getting started with gnuplot

cd "/opt/gnuplot/demo"
load "filename"

plot sin(x)
replot cos(x)

Links:
http://www.ibm.com/developerworks/library/l-gnuplot/

Printing to a PDF file:
set terminal pdf
set output "graph.pdf"
plot [0:100] "file.txt" with lines;
set terminal x11