Apache OpenOffice (AOO) Bugzilla – Issue 35226
XY diagrams+regressions are incorrect if input data has gaps
Last modified: 2013-02-24 21:18:53 UTC
Working with X-Y-Diagrams and regressions I discovered some erroneous behaviour concerning the diagram's axis scale and regression display: - The x axis scale will automatically start at 0, even if there is no value of o in the table (except the gap, which should be ignored!) - A linear regression shown in the diagram is placed incorrectly if the axis scale(s) are manually changed. It always assumes the axis to start at 0. To make this much clearer I have an example document attached. You can also do the following to reproduce the error: Open a new document Enter a XY table with at least one gap, e.g. X Y A 5 10 B 6 12 C 7 13 D <-gap E 9 21 F 11 20 G 4 7 H 3 6 Calculate the regression: y=x*2.01-0.2 This works correctly. 1. Now insert an X-Y-diagram. The diagram will scale the x axis from 0 to 11, although is should be 3 to 11. This is because of the data gap, but nonetheless is an error of OOo. 2. Now insert a linear regression. It will show up correctly. Now manually rescale the x axis from 3 to 11. The data points will change accordingly, but not the linear regression. It remains where it was and consequently is WRONG. 3. Now set the x axis back to automatic values. Then enter some data into the gap (see how the diagram changes) and remove it afterwards. Now the x axis scales (automatically) correctly, but the regression is wrong again. Funny, isn't it? Result: - A gap in the data set makes XY diagrams scales their axis' incorrectly (start at 0) - A gap in the data set makes regressions to be drawn wrongly unless the x axis starts at 0. I think this error is serious, because it simply produces wrong regression diagrams - a big problem for serious scientific work!
Created attachment 18259 [details] Spreadsheet showing a diagram with a wrong regression line.
Found in the OOo2.0 branch (OOo1.9.54) as well. This definitely needs to be fixed until OOo2.0 final IMHO.
Wrong Component, I've changed it. Frank
reassigned and confirmed
Hi Bjoern, pls have a look. tk
The gap is probably taken into account in the calculation of "n", the number of data points for the calculation.
This bug was fixed with the complete re-implementation of the chart module starting with version SRC680m213.
->kla: Please verify and close.
verified
seen ok in master -> closed