0

I try to plot a data with an exponentiel regression :

set terminal postscript enhanced color
set output 'fichier.ps'
set logscale y
set logscale x
set format y "10^{%L}" 
set format x "10^{%L}" 
set key inside right top
set xlabel " lines "
set ylabel " Time(nanoseconds)"

f(x) = a + b*exp (x)
fit f(x) 'fichier.csv' using 16:17 via a, b

plot 'fichier.csv' using 16:17 with points title "title" lw 3 pt 4 linecolor rgb "#FF0000",  f(x) with lines title "regtitle" linecolor rgb "#000000" lw 3

I have this error :

Max. number of data points scaled up to: 3072
         Undefined value during function evaluation

and i run on gnuplot 4.4

how to resolve problem ?

3
  • 1
    How large do your values of x get? Is it possible that exp(x) results in an overflow? Another thing you could try is setting an initial guess for your values of a and b. You do this simply by setting those variables before you issue your fit command: a=1.0;b=1.0 Commented Dec 12, 2012 at 16:19
  • Note that overflow occurs somewhere between exp(709.) and exp(710.), but your x values might need to be smaller than that since it also gets multiplied by b which could be bigger than 1. Commented Dec 12, 2012 at 16:23
  • This sometimes occurs with me. And then suddenly stops, working again... It really makes me sad. Commented Dec 11, 2014 at 23:16

1 Answer 1

1

The message Max. number of data points scaled up to: 3072 has nothing to do with the fit error, see also Gnuplot : How to set max number of data points for fit

Your fit error likely is due to faulty data or badly set initial values of the parameters. If you don't set the variables at all before the fit, gnuplot initialises them with 1.0, which might be totally off. Exponential fits are notoriously unstable with bad starting values. You might use gnuplots stats command to find out a bit more about your data before fitting.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.