Bug 394029 - Auto x/y-range keeps constant
Summary: Auto x/y-range keeps constant
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: 2018-05-08 23:51 UTC by Uwe Stöhr
Modified: 2019-08-10 13:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.7


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stöhr 2018-05-08 23:51:15 UTC
- create a new table with 2 columns
- fill the table columns with row numbers
- highlight both columns and create a new custom fit in new fit in new worksheet
- in the plot properties change the x-Range from "Auto" to x=1..30

result: the change is not applied unless one presses Enter. This is a regression, see bug 394026. The bug here is, however, that the y-Range is still in Auto. But as once changed the x-range, I expect the y-Range to change accordingly. But here it remains at y=1..100.
Comment 1 Stefan Gerlach 2018-11-10 10:18:17 UTC
Currently we auto scale the y plot range to the whole data set not only to the data of the selected (shown) x range. Does it make sense to auto scale the y range only to the data in the x range?
Comment 2 Uwe Stöhr 2019-01-14 12:13:17 UTC
(In reply to Stefan Gerlach from comment #1)
> Currently we auto scale the y plot range to the whole data set not only to
> the data of the selected (shown) x range. Does it make sense to auto scale
> the y range only to the data in the x range?

Well, when I explicitly set an x-range I have a reason. The only reason I can imagine is to see only the curve in the range i selected. This iplies of course that the y-range needs to be adapted too - to show only the function values in the selected x-range.

Btw., if you send me a new version of LabPlot to test, I will do so.
Comment 3 Uwe Stöhr 2019-07-08 22:35:52 UTC
This issue remains in LP 2.7 RC5: When I explicitly change the x-range in a plot and keep the y-range on AUTO, I expect that the y-range will automatically be adjusted to the y-range in the given x-range.
So in my example changing the x-range to 1..30 should automatically change the y-range to 1..30 as well since 1..100 is senseless because there is no y > 30 for the given x-range.
Comment 4 Martin 2019-07-16 17:34:37 UTC
But should we realize this on both axis? Because if this behaviour is on both, there is no possibility simply reset the zoom. For this you have to zoom completely out and the autoscale.
Comment 5 Alexander Semke 2019-08-10 13:21:54 UTC
Git commit 96ecba5a1ae189a9254d11ce046f12750523636e by Alexander Semke, on behalf of Martin Mamsoler.
Committed on 10/08/2019 at 13:20.
Pushed by asemke into branch 'master'.

[worksheet] when doing auto-scaling in the plot, respect the current data ranges.
FIXED-IN: 2.7
Differential Revision: https://phabricator.kde.org/D22495

M  +12   -0    src/backend/core/AbstractColumn.cpp
M  +2    -0    src/backend/core/AbstractColumn.h
M  +122  -72   src/backend/core/column/Column.cpp
M  +2    -0    src/backend/core/column/Column.h
M  +334  -150  src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
M  +2    -2    src/backend/worksheet/plots/cartesian/CartesianPlot.h
M  +122  -23   src/backend/worksheet/plots/cartesian/XYCurve.cpp
M  +4    -1    src/backend/worksheet/plots/cartesian/XYCurve.h

https://commits.kde.org/labplot/96ecba5a1ae189a9254d11ce046f12750523636e