Bug 408530 - error bars not correctly shown in plots
Summary: error bars not correctly shown in plots
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: frontend (show other bugs)
Version: latest
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-10 14:43 UTC by Uwe Stöhr
Modified: 2019-06-12 20:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.7
Sentry Crash Report:


Attachments
plot showing the bug (17.51 KB, application/gzip)
2019-06-10 14:43 UTC, Uwe Stöhr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stöhr 2019-06-10 14:43:25 UTC
Created attachment 120752 [details]
plot showing the bug

- open the attached example file
- look at the plot:
the error bars of the first data points are missing and I cannot find out why

The Chi^2_red is however correctly calculated using also the undisplayed error bars. So it is a pure display bug but a nasty one since one cannot use the plot in papers, presentations etc.
Comment 1 Alexander Semke 2019-06-10 15:15:16 UTC
For the y-error you use the column "thickness error" and the value for the first point is zero. This is the reason why no error bars are shown for the first values.

For the next points with energy = 320, 260, ... 560J no error bars are shown - this is bug. Here we don't handle correctly the rows from 2 to 8 in the spreadsheet having NANs. I'll fix this. Removing those rows can be used as a temporary workaround.
Comment 2 Uwe Stöhr 2019-06-10 19:58:49 UTC
> the value for the first point is zero.

Yes, this is purposely and I also don't want an error bar. Physics says it must be zero so there cannot be an error.

> For the next points with energy = 320, 260, ... 560J no error bars are shown - this is bug. Here we don't handle correctly the rows from 2 to 8 in the spreadsheet having NANs. I'll fix this.

Thank you.
Comment 3 Alexander Semke 2019-06-12 20:54:57 UTC
Git commit ec38c0da33083a2a4790df1e7cdd0959d6a4ca09 by Alexander Semke.
Committed on 12/06/2019 at 20:54.
Pushed by asemke into branch 'master'.

Correctly show error bars for data source columns having NANs.
FIXED-IN: 2.7

M  +14   -18   src/backend/worksheet/plots/cartesian/XYCurve.cpp
M  +1    -0    src/backend/worksheet/plots/cartesian/XYCurvePrivate.h

https://commits.kde.org/labplot/ec38c0da33083a2a4790df1e7cdd0959d6a4ca09