I am a big fan of Gnuplot and I used it all along my studies for various projects.
Lately I wanted to use Gnuplot to chart some time series like weight loss, exercising results, gas consumptions etc.
Therefore I scale the x-axis like
set xdata time
set timefmt "%d.%m %Y"
set format x "%d.%m"
Now I want to use the fit-function to give me a linear fit. My problem is, that I cannot get that to work if the x-axis is time-related.
Then change the date to a number, for example a number of days starting from the first date, make the fit, and then convert the numbers back again into dates. That way you'll have "regular" x and y data set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With