Open devel-chm opened 1 month ago
I tried this on two other machines, one win11 with nvidia graphics and another with win10 and intel graphics. These both showed the correct image:
What is the GPU of the faulty plot?
Could you also try this with the faulty plot?
begin
using GLMakie;
data = [1 + 2*rand() + i/100 for i in 1:10000];
f, a, p = lines(data)
p.attributes[:debug] = Observable(true)
f
end
@SimonDanisch: GPU is AMD Radeon Pro WX 3200 series
@ffreyer: The resulting image:
Does joinstyle = :bevel
fix this?
Looks like art!
The green parts in the debug plot are lines that are hidden due to joint truncation. Since there is more green towards the top and less spikes, I'm thinking that always truncating may hide the issue.
But we shouldn't have such long line segments in the first place. Something is wrong with the quad positions. My guess would be that normalize(a - b)
or (a - b) / length(a - b)
is unstable here.
Maybe another good test would be to make the line alternate so that we should always get truncated joints. If we don't then the failure has to happen pretty early, i.e. probably with the normalizations.
begin
using GLMakie;
data = [1 + 2*(i % 2) + i/100 for i in 1:10000];
f, a, p = lines(data)
p.attributes[:debug] = Observable(true)
f
end
Does
joinstyle = :bevel
fix this?
No but :round did appear to fix it. NOTE: I did not see :bevel as one of the documented joinstyles for GLMakie.
Previously posted on discourse at https://discourse.julialang.org/t/lines-plot-artifacts-with-glmakie-v0-10-2-on-julia-1-10-3-win10/114933
I was plotting some curves with a lot of low level noise with GLMakie and the plots had a lot of extra line cruft as if the line segments for the lines in the plot were not being correctly handled.
A MWE for the above example is
This should show a line of slope 1/100 with random noise as a thickening strip of size 2 superimposed.
This is much less than the figure dimensions so the plot should resemble a thick line. I find that if I zoom in enough that some/most of the spilling line ends clean up.