The following example is very easy to follow along with, anything much harder is just that much easier to get lost in....
The file called 'data' contains the following data: (you can change this to whatever it is you want to graph)
10 1 20 1.30 30 1.48 40 1.60 50 1.70 60 1.78 70 1.85 80 1.90 90 1.95 100 2.00
The following transcript shows the commands used to plot the data in the file 'data' and save it to a postscript file.
[ethern@cislab ethern]$ gnuplot #at a command prompt, type in 'gnuplot' to start the program Terminal type set to 'x11'
--this is the start of the 'gnuplot' command line interface-- gnuplot> set data style linespoints gnuplot> set grid gnuplot> set title "A graph" gnuplot> set xlabel "x" gnuplot> set ylabel "y = log(x)" gnuplot> plot "data" gnuplot> set term postscript Terminal type set to 'postscript' Options are 'landscape noenhanced monochrome dashed defaultplex "Helvetica" 14' gnuplot> set output "graph.ps" gnuplot> replot gnuplot> set output gnuplot> set term x11 Terminal type set to 'x11' Options are '0' gnuplot> exit
--typing 'exit' will get you out when you have had quit enough of the wonderous command line interface--
The commands, and what they mean:
The generated postscript file can then be viewed using 'ghostview'
( or your favorite .ps viewer).
If you need help in gnuplot, you can always type in 'help' in the program and it will list the common commands that you can use. You can also type in 'help topic' where 'topic' is a specific command, and it will give a more detailed description of how to use that specific command.