Bug 420624

Summary: Can't change the number of points for smoothing when "Data" set as x-Data
Product: [Applications] LabPlot2 Reporter: disuser
Component: generalAssignee: Alexander Semke <alexander.semke>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: latest   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 2.8
Sentry Crash Report:
Attachments: smoothing options

Description disuser 2020-04-26 14:52:12 UTC
I can't change the number of points for smoothing when "Data" values are set as x-Data.
Comment 1 disuser 2020-04-26 14:53:12 UTC
EDIT: (...) when "Date" values are set as x-Data. Sorry.
Comment 2 Alexander Semke 2020-04-26 15:03:24 UTC
It is possible to specify the range for x which should be used. On default, "auto" is used and all data is used. If you uncheck this, you can specify the min and max values for x - the smooth function will be calculated for the specified range. Is this what you're looking for?
Comment 3 disuser 2020-04-26 15:18:19 UTC
No, I'm not talking about the range for x-values. But I have just checked the settings for it and the range is represented in numeric form even if Date-values are assigned to x-Data.

What I have in mind is the number of points required to compute smoothed values (e.g. 3 days moving averages, or running percentiles etc.) This option is available just below the type of Smooth and I can't change it (2.7.0+git202004261232~ubuntu19.10.1). By the way, it would be great to treat the smooth also as a fit to get a display of residuals (residual = data - smooth) for further analysis.
Comment 4 Alexander Semke 2020-04-26 19:51:47 UTC
Created attachment 127902 [details]
smoothing options
Comment 5 Alexander Semke 2020-04-26 19:55:52 UTC
(In reply to disuser from comment #3)
> No, I'm not talking about the range for x-values. But I have just checked
> the settings for it and the range is represented in numeric form even if
> Date-values are assigned to x-Data.
Yes, this because we internally convert DateTime values to plottable integers. This is what you see in the range settings now. We need to convert the values back to DateTime when showing the range. I'm on it already.

> 
> What I have in mind is the number of points required to compute smoothed
> values (e.g. 3 days moving averages, or running percentiles etc.) This
> option is available just below the type of Smooth and I can't change it
> (2.7.0+git202004261232~ubuntu19.10.1).
This is the option you need. See the attached file how it should like. Is this spin box completely deactivated for you so you cannot use those arrow buttons to change the value or to enter the value manually? Once you changed the value, you'll need to click on the "Recalculate" button again.

> By the way, it would be great to
> treat the smooth also as a fit to get a display of residuals (residual =
> data - smooth) for further analysis.
Ok. This is tracked now in Bug 420540, right?
Comment 6 disuser 2020-04-27 06:22:13 UTC
> This is tracked now in Bug 420540, right?

Yes, this issue is tracked in that bug report.