Bug 433267

Summary: xy-Curve is shifted randomly
Product: [Applications] LabPlot2 Reporter: je.nickp
Component: generalAssignee: Stefan Gerlach <stefan.gerlach>
Status: RESOLVED FIXED    
Severity: critical CC: stefan.gerlach
Priority: NOR    
Version First Reported In: 2.8.1   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: A sample file to produce the bug

Description je.nickp 2021-02-19 18:48:21 UTC
Created attachment 135913 [details]
A sample file to produce the bug

SUMMARY
xy-Curve is shifted randomly.

STEPS TO REPRODUCE
1. Create a new project>worksheet>xy-plot.
2. Add a xy-Curve from a Formula.
3. Set the formula to y=0.5.
4- Set the y-Range to (0.46, 0.52).
[A sample file showing the bug is attached].

OBSERVED RESULT
The curve is plotted at y=0.503. If you change the y-Range, the curve shifts upward or downward randomly.

EXPECTED RESULT
The curve must be plotted at y=0.5.

SOFTWARE/OS VERSIONS
Windows: Windows 10, build 19042.746

ADDITIONAL INFORMATION
I have a 4k monitor (its dpi is 240).
Comment 1 Stefan Gerlach 2021-02-21 10:37:22 UTC
The curve is correctly plotted at y=0.5 but the y-axis tick label are rounded too much. The precision must be increased to avoid rounded values on the ticks or the number of ticks should be selected better. We will work on improving these settings when using auto-configuration.
Comment 2 je.nickp 2021-02-21 18:58:50 UTC
(In reply to Stefan Gerlach from comment #1)
> The curve is correctly plotted at y=0.5 but the y-axis tick label are
> rounded too much. The precision must be increased to avoid rounded values on
> the ticks or the number of ticks should be selected better. We will work on
> improving these settings when using auto-configuration.

You're right. It's my bad. Thanks.
Comment 3 Stefan Gerlach 2021-03-14 22:47:12 UTC
LabPlot now chooses the number of ticks using the axes range. This works quite well in producing round values at the axes ticks and avoids this effect.