Bug 421088 - Where are the interpolated data?
Summary: Where are the interpolated data?
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (show other bugs)
Version: 2.7.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 21:24 UTC by RG
Modified: 2022-09-03 10:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.10


Attachments
LabPlot2 File, does not save worksheet with plot (17.26 KB, application/gzip)
2020-05-07 18:28 UTC, RG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RG 2020-05-05 21:24:21 UTC
SUMMARY
Today I tried Labplot for the first time and compliment, I like it very much.
Unfortunately I got stuck with my first Use Case:

STEPS TO REPRODUCE
1. new spreadsheet filled with 10 xy-pairs
2. menu / Analysis greyed out - ?
3. right click on Y-column / Analyze and Plot Data / Interpolate - this works as expected
4. but where are the interpolated data?

OBSERVED RESULT
Interpolated data can only be seen in the graphic

EXPECTED RESULT
I would have expected a new spreadsheet with the interpolated data or an extension of the source spreadsheet. 
What am I doing wrong?


SOFTWARE/OS VERSIONS
Win 10 64 bit

ADDITIONAL INFORMATION
-
Comment 1 Alexander Semke 2020-05-06 07:19:10 UTC
(In reply to RG from comment #0)
> SUMMARY
> Today I tried Labplot for the first time and compliment, I like it very much.
Thanks a lot for the compliment.


> Unfortunately I got stuck with my first Use Case:
> 
> STEPS TO REPRODUCE
> 1. new spreadsheet filled with 10 xy-pairs
> 2. menu / Analysis greyed out - ?
> 3. right click on Y-column / Analyze and Plot Data / Interpolate - this
> works as expected
> 4. but where are the interpolated data?
> 
> OBSERVED RESULT
> Interpolated data can only be seen in the graphic
> 
> EXPECTED RESULT
> I would have expected a new spreadsheet with the interpolated data or an
> extension of the source spreadsheet. 
> What am I doing wrong?
You are not doing anything wrong. The functionality behind this "Analyze and Plot Data" context menu produces only the visualization. This was meant to be a short cut to the manual creation of plots and curves and assignments of spreadsheet columns to the data source columns for the xy-curve. So, it was not meant to generate and to add new data to the spreadsheet.

Why do you need to have this data in the spreadsheet? To visualize it or do you need to modify the interpolated values?
Comment 2 RG 2020-05-06 19:35:51 UTC
Oh no, that's a feature? Please give me the bug :-)


> Why do you need to have this data in the spreadsheet?

My goals are very good here: https://stackoverflow.com/questions/33808554/resample-time-series-of-position-evenly-in-time 
 and here: https://towardsdatascience.com/preprocessing-iot-data-linear-resampling-dde750910531 
 described.
In brief: My series of observations are unevenly sampled. But to average several series the sampling rate must be identical for all series. Hence the idea of interpolation.
Is there another way for LabPlot to achieve this goal?

BTW:
The worksheet with Plot is volatile. Despite saving, the worksheet with my plot disappeared after restarting. Is that the intention?
Comment 3 RG 2020-05-06 19:49:10 UTC
> do you need to modify the interpolated values?

I would like to do the preprocessing of the data in LabPlot. The further processing, which is complicated in detail, should be done with another program.
Comment 4 Alexander Semke 2020-05-07 07:03:18 UTC
(In reply to RG from comment #2)
> Oh no, that's a feature? Please give me the bug :-)
> 
> 
> > Why do you need to have this data in the spreadsheet?
> 
> My goals are very good here:
> https://stackoverflow.com/questions/33808554/resample-time-series-of-
> position-evenly-in-time 
>  and here:
> https://towardsdatascience.com/preprocessing-iot-data-linear-resampling-
> dde750910531 
>  described.
> In brief: My series of observations are unevenly sampled. But to average
> several series the sampling rate must be identical for all series. Hence the
> idea of interpolation.
> Is there another way for LabPlot to achieve this goal?
Ok. You want to resample the data. We can add this to the context menu of the column under "Manipulate Data" maybe. I think it should be possible to modify the data in the existing column, i.e. the resampled data is put into the original column, and it should be possible to put the resampled data into a new column. Agree?

> BTW:
> The worksheet with Plot is volatile. Despite saving, the worksheet with my
> plot disappeared after restarting. Is that the intention?
No, not at all. In 2.7 we had a bug that was fixed in 2.8 and I think this is the bug that is hitting you now. Can you please attach here your project file so I can validate?
Comment 5 RG 2020-05-07 18:28:13 UTC
Created attachment 128239 [details]
LabPlot2 File, does not save worksheet with plot
Comment 6 RG 2020-05-07 18:31:26 UTC
> Ok. You want to resample the data. 
> We can add this to the context menu of the column
> under "Manipulate Data" maybe. 

I see resample in the same category as data reduction.


> I think it should be possible to modify the data in the existing column, 
> i.e. the resampled data is put into the original column,
> and it should be possible to put the resampled data into a new column.
> Agree?

I would prefer a more general approach. All analysis functions create (new) columns in a hidden worksheet. If the data is needed numerically, the worksheet can be made visible. So even smoothed, filtered, fitted ... data can be further processed externally.


> Can you please attach here your project file so I can validate?

Sure, file PPrunden_smooth.lml is attached. Thanks for the support.
Comment 7 Alexander Semke 2020-05-07 19:52:22 UTC
(In reply to RG from comment #6)
> > Ok. You want to resample the data. 
> > We can add this to the context menu of the column
> > under "Manipulate Data" maybe. 
> 
> I see resample in the same category as data reduction.
> 
> 
> > I think it should be possible to modify the data in the existing column, 
> > i.e. the resampled data is put into the original column,
> > and it should be possible to put the resampled data into a new column.
> > Agree?
> 
> I would prefer a more general approach. All analysis functions create (new)
> columns in a hidden worksheet. If the data is needed numerically, the
> worksheet can be made visible. So even smoothed, filtered, fitted ... data
> can be further processed externally.
If we hide the data, we need to explain the user how to get it. At the moment the data smoothed, interpolated, etc. data is available internally and is used for the visualization of the curve in the plot. The generated data is "attached" to the curve and we can add maybe a "Copy data" to context menu of the curve. With this you would be able to copy the data and paste it in the spreadsheet.

Alternatively, we generate a new column in the source spreadsheet and add the smoothed, interpolated, etc. data into it. Maybe we should enable both ways...


> > Can you please attach here your project file so I can validate?
> 
> Sure, file PPrunden_smooth.lml is attached. Thanks for the support.
Yes, this is the same issue as in https://bugs.kde.org/show_bug.cgi?id=413401. Please check my last comment there. This problem is fixed in 2.8. We didn't release 2.8 yet but we're already finalizing everything for the release now. We have nightly builds for windows. If you want give it a try, download from https://labplot.kde.org/download/. The new features for 2.8 were described in the last couple of blog posts on our homepage.
Comment 8 RG 2020-05-07 21:44:42 UTC
> Alternatively, we generate a new column in the source 
> spreadsheet and add the smoothed, interpolated, etc. 
> data into it. Maybe we should enable both ways...

That would be wonderful! 
Many thanks for the positive feedback.

Robert
Comment 9 Alexander Semke 2022-09-03 10:58:37 UTC
(In reply to RG from comment #8)
> > Alternatively, we generate a new column in the source 
> > spreadsheet and add the smoothed, interpolated, etc. 
> > data into it. Maybe we should enable both ways...
> 
> That would be wonderful! 
> Many thanks for the positive feedback.
> 
It is possible now to generate a "data spreadsheet" for every analysis curve (fit, smooth, interpolation, etc.). This feature will be part of the coming release 2.10 and can already be tried out in our nightly builds. If you also would like to give it a try now and to provide feedback, please install the current nightly build (go to https://labplot.kde.org/download/ and navigate to "Development Version"). Thank you for your feedback!