PLOTTING, FITTING AND SAVING AS A POSTSCRIPT FILE USING GNUPLOT
                                                                                                    

a) Plotting

This part assumes that you have a data file in the text (ASCII) form.
(in this example "filname.csv". Nothing particular about ".csv" extension!!
Your extension could be .dat or .txt or similar ones.)
To create such a data file you could use any text editor (vi, gedit...).


                a) open a new terminal (right click on the desktop)
                b) type: gnuplot

Now you'll get the gnuplot prompt
 
                c) type: set data style linespoints
 
If you don't want to show the points in the graph avoid "points" in the above command
       
                d) type: plot "filename.csv" u 1:2

u 1:2 gives the plot of the 1st & 2nd columns,with 1st column values along x axis and 2nd column values along y axis.
   
                e) type: set xlabel "parameter along x axis"
                f) type: set ylabel "parameter along y axis"
                g) type: set title "title of the graph"
 
b) Fitting the graph
 
                a) type: f(x)=a*x+b    [ if you want to fit a straight line ]
                b) type: fit f(x) "filename.csv" u 1:2 via a,b

This will give you the values of a & b.Note it down.

                 c) type: plot f(x),"filename.csv" u 1:2

c) Saving as postscript(.ps) file

                a) type: set terminal postscript
                b) type: set output "filename.ps"
                c) type: replot

Now your file will be saved as filename.ps

d) Exit from gnuplot

                a)type: exit

To learn how to use gnuplot you may go to:
http://www.cs.uni.edu/Help/gnuplot/