Bug 475408 - Curve fitting on log axis needs extremely many evaluated points
Summary: Curve fitting on log axis needs extremely many evaluated points
Status: CONFIRMED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.10.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-09 20:07 UTC by nuutilajuha
Modified: 2023-11-13 21:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nuutilajuha 2023-10-09 20:07:00 UTC
SUMMARY

I am fitting a curve to my data, which contains 9 data points. Each data point is separated on the x-axis by 1 order of magnitude (X 0.0001, 0.001, 0.01, 1, etc.)

By default, the curve fitting tool will evaluate the curve for only the first 1000 or so points, drawing only the upper tip of my data. I have to manually increase the evaluated points to 100 million to get my curve completely fitted, at which point the program becomes quite sluggish.

I could of course take log10 of my x-axis values and plot and fit it on linear axes to make a similar plot, but I'm interested in comparing my coefficients to other publications.

STEPS TO REPRODUCE
1. Create quick test data with Octave notebook: x = [0.0001 0.001 0.01 0.1 1 10 100 1000 10000]; y = [12 9 15 35 70 85 91 89 94];
2. Plot the xy-curve, set X-Range of the plot area to log10 scale
3. Fit modified Hill equation to the xy-curve: a + (b-a) * ( (x^n) / ((x^n)+(K^n)) )
4. Gradually increase the evaluated points from fit options to 100 million to get the whole curve plotted
5. Try modifying any of the parameters and coefficients or running the fit

OBSERVED RESULT
Modifying the fit or running the curve fitting tool becomes sluggish because it needs to evaluate 100 million points.

EXPECTED RESULT
The fitting could be a bit snappier. Could the fitting tool evaluate points more evenly/sparingly between the maximum and minimum x-axis values when the axis is on a log scale?

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version:  5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION