Results 1 to 3 of 3
I don't know if this is the correct place for this, but I wanted to graph in gnuplot one column of a data file using the formula y=mx+b... where m ...
Enjoy an ad free experience by logging in. Not a member yet? Register.

 07032009 #1
 Join Date
 Jun 2009
 Location
 New York
 Posts
 12
plotting a data file in ginuplot in linux
Because I did not know how to make a line like that with many x values in gnuplot, I just found 2 points by solving for two specifc x's...this did work but once I graphed the line I could not figure out how to extend the line further than those two points...
~So if it is possible to extend the line of thosetwo points then what is the code? ... would doing a best fit line for those two points give me the line for all of those data points? If so...how do I do that?
~If not, then what is the code to just graph all of those data points for x?
Any suggestions are appreciated.
Thanks
 07082009 #2
So you basically have a column of data (which we will call x) and you want to plot coordinates by using that x and a y which is a formula?
I suspect this will work:
Code:plot "datafile.dat" using 1:(m * $1 + b)
This works by telling plot which columns to use. Here we say that the first column will be used for the x value, and the expression that we have given will be used for the y value. In that expression, $1 refers to the first column of the datafile.
I hope this helps! You can learn more at:
Using
 07112009 #3
 Join Date
 Jun 2009
 Location
 New York
 Posts
 12
Thankyou SO much, it did work, I've been trying to figure it out forever..