Bug 432391 - Drop lines aren't correctly drawn when the curve doesn't fit inside axis box
Summary: Drop lines aren't correctly drawn when the curve doesn't fit inside axis box
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: frontend (show other bugs)
Version: latest
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-01 18:11 UTC by Orestes Mas
Modified: 2021-02-07 15:55 UTC (History)
0 users

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


Attachments
Plot, drop lines on, with clipping (40.39 KB, image/png)
2021-02-01 18:11 UTC, Orestes Mas
Details
Plot, drop lines on, without clipping (46.60 KB, image/png)
2021-02-01 18:11 UTC, Orestes Mas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Orestes Mas 2021-02-01 18:11:14 UTC
Created attachment 135354 [details]
Plot, drop lines on, with clipping

SUMMARY

When a curve is clipped by the axis box, drop lines (if activated) doesn't draw where the curve gets clipped.


STEPS TO REPRODUCE
1. Plot some function, e.g. a sinusoid.
2. Select the curve and activate the drop lines, X, zero baseline.
3. Zoom in (using the mouse wheel, for instance) until the curve gets clipped by the axes box limits.

OBSERVED RESULT
The drop lines aren't drawn under the parts of the curve that are clipped.


EXPECTED RESULT
All drop lines shouldbe drawn, regardless of the clipping.

SOFTWARE/OS VERSIONS
Linux kernel: 5.10.0-2-amd64
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
labplot compiled from git master 7ea2e535dcf6b222b167cda9bc769615bb57dcd6
Comment 1 Orestes Mas 2021-02-01 18:11:53 UTC
Created attachment 135355 [details]
Plot, drop lines on, without clipping
Comment 2 Alexander Semke 2021-02-01 20:49:36 UTC
(In reply to Orestes Mas from comment #0)
> Created attachment 135354 [details]
> Plot, drop lines on, with clipping
> 
> SUMMARY
> 
> When a curve is clipped by the axis box, drop lines (if activated) doesn't
> draw where the curve gets clipped.
Yes, looks wrong... We'll check.

P.S:: by looking at the attached screenshot it looks like a curve filling and not like "drop lines". Not sure it was intented or not but in case you just want to fill the area below the curve, you can use the option in the tab "filling" in the curve properties.
Comment 3 Orestes Mas 2021-02-02 11:06:13 UTC
It looks like a "curve filling" because my dataset had 15000 points so the drop lines are close together. Before filing the bug report I tried with a curve generated from a math equation, fith far less points, with the same result.

By the way, the curve filling feature has other strange behaviours. I'll try to 
gather them in a video and open anodther bug report later.
Comment 4 Alexander Semke 2021-02-07 09:32:46 UTC
Git commit b1d93d791fa537f1129cbab24b3b792bd68614f8 by Alexander Semke.
Committed on 07/02/2021 at 09:32.
Pushed by asemke into branch 'master'.

[worksheet] don't skip the inivisble data points when calculation the drop
lines, we still need to determing the parts of the drop lines falling
inth the current plot region.
FIXED-IN: 2.8.2

M  +1    -0    ChangeLog
M  +2    -7    src/backend/worksheet/plots/cartesian/XYCurve.cpp

https://invent.kde.org/education/labplot/commit/b1d93d791fa537f1129cbab24b3b792bd68614f8
Comment 5 Alexander Semke 2021-02-07 15:55:33 UTC
Git commit f3ad7f4bbceb02d0852fdd00f42a69a914e68557 by Alexander Semke.
Committed on 07/02/2021 at 15:54.
Pushed by asemke into branch 'release/2.8'.

[worksheet] don't skip the inivisble data points when calculation the drop
lines, we still need to determing the parts of the drop lines falling
inth the current plot region.
FIXED-IN: 2.8.2

M  +1    -0    ChangeLog
M  +2    -7    src/backend/worksheet/plots/cartesian/XYCurve.cpp

https://invent.kde.org/education/labplot/commit/f3ad7f4bbceb02d0852fdd00f42a69a914e68557