I read from the second answer in this thread how to display the line of fit equation on a gnuplot for a linear line of fit. When I try to export that solution to my situation, which is an exponential line of fit, the equation does not display.
My line of code is:
plot "rate.out" t "$target hole density" w lines, f(x) t sprintf('f(x) = %.2f(1-exp(-x/%.2f))', a, tau)
The first part of the code is fine; the segment beginning with sprintf does not seem to be correct.
The line of fit is:
f(x) = a*(1-exp(-x/tau))
- Is there a way to display the equation of my line on the graph?
- Incidentally, can I display it as f(t)? I tried writing my line of fit using f(t), but the fit algorithm returns an error unless I write it as f(x).