# GLMakie: line segments missing in plot of large data set

**URL:** <https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244>\
**Category:** General Usage\
**Tags:** glmakie\
**Created:** [July 31, 2025, 9:46am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244 "2025-07-31T09:46:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![marast](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@marast](https://discourse.julialang.org/u/marast)\
**Post date:** [July 31, 2025, 9:46am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/1 "2025-07-31T09:46:54Z")

</div>

Hello,  
in plots of large data sets with GLMakie some line segments are missing. This behaviour started from version 0.13.0. I reduced it to the following example:

```julia-auto
using GLMakie

# generating data
Δt = 0.02
t_max = 100000.0
t = 0.0:Δt:t_max
f = sin.(2 * π * t)

# plotting data
fig = Figure()
ax = Axis(fig[1,1])
lines!(ax, t, f)
xlims!(ax, t[end] - 1, t[end])
display(fig)

```

For version 0.13.0 and onwards the resulting figure looks like this:

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/7/5/75d4243da78c2145e5dd0dafd8aabe9e6de26655.png)

Whereas, for version 0.12.0 the resulting figure looks normal:

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/b/8/b8f19c50fa1626f5a34af6dbb1518d88108a5792.png)

It would be interesting if anyone has observed similar effects or can reproduce this bug on other hardware. I am using the integrated graphics of a AMD 7950X CPU.

---

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [July 31, 2025, 10:06am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/2 "2025-07-31T10:06:36Z")

</div>

Hi,

I cannot reproduce this (i.e. I get the bottom figure) using GLMakie v0.13.3, Julia 1.11.5, an intel i7-7700K CPU, RTX 3070 GPU, and Windows 11.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [July 31, 2025, 10:59am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/3 "2025-07-31T10:59:38Z")

</div>

Maybe related to

> <https://github.com/MakieOrg/Makie.jl/pull/5216>
>
> \# Description
> 
> This restores the init-time decision between having a line patt…ern texture or not, and replaces \`lastlength\` arrays with dummy data when they are not needed. This fixes an issue reported on Slack, where random segments of a line disappear:
> 
> \`\`\`julia
> using GLMakie, Dates
> f,a,p = lines(Date(2000):Year(1):Date(2009), rand(10))
> \`\`\`
> 
> \<img width="578" height="426" alt="grafik" src="https://github.com/user-attachments/assets/a1d53284-23d2-4bd7-a9b4-a55a39e454c2" /\>
> 
> I didn't thoroughly think through the cause of this issue, but it's probably a Float32 precision issue with \`f\_pattern\_overwrite\` in \`process\_pattern()\` in \`lines.geom\`. The dates convert to large numbers ~6e13. Without patterns, GLMakie skipped projections when calculating \`gl\_last\_length\`, so that they ended up with ~6f13 values too. With the \`pattern\` texture always given, the shader ended up mixing those values with pixel scale offsets, which are way below float precision. I assume that (or something similar) caused texture sampling to break.
> 
> Setting \`gl\_last\_length\` to NaN's, Inf's, zeros, etc fixes the issue. Skipping the \`pattern::Texture\` branches does too, and it should improve performance.
> 
> \## Type of change
> 
> \- \[x\] Bug fix (non-breaking change which fixes an issue)
> 
> \## Checklist
> 
> \- \[x\] Added an entry in CHANGELOG.md (for new features and breaking changes)
> \- \[\] Added or changed relevant sections in the documentation
> \- \[\] Added unit tests for new algorithms, conversion methods, etc.
> \- \[x\] Added reference image tests for new plotting functions, recipes, visual options, etc.

?

---

<div class="post-metadata">

**Author:** ![marast](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@marast](https://discourse.julialang.org/u/marast)\
**Post date:** [July 31, 2025, 11:18am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/4 "2025-07-31T11:18:32Z")

</div>

It seems to be the same issue. Good to know that there is already a pull request. Thanks for sharing this!

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.julialang.org/u/TimG)\
**Post date:** [July 31, 2025, 11:19am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/5 "2025-07-31T11:19:19Z")

</div>

I do see something similar using GLMakie v0.13.4.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/2/d2252fcaaa26fc9d0f7e0ffe6ec6c497b78618fd.png)

julia\> versioninfo()  
Julia Version 1.11.6  
Commit 9615af0f26 (2025-07-09 12:58 UTC)  
Build Info:  
Official [https://julialang.org/](https://julialang.org/) release  
Platform Info:  
OS: Windows (x86\_64-w64-mingw32)  
CPU: 8 × 11th Gen Intel(R) Core™ i7-1185G7 @ 3.00GHz  
WORD\_SIZE: 64  
LLVM: libLLVM-16.0.6 (ORCJIT, tigerlake)  
Threads: 4 default, 0 interactive, 2 GC (on 8 virtual cores)  
Environment:  
JULIA\_EDITOR = code  
JULIA\_VSCODE\_REPL = 1  
JULIA\_NUM\_THREADS = 4

---

<div class="post-metadata">

**Author:** ![marast](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@marast](https://discourse.julialang.org/u/marast)\
**Post date:** [August 1, 2025, 8:32am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/6 "2025-08-01T08:32:29Z")

</div>

Thanks for testing on your hardware. This issue seems to hardware dependent. Let’s see if the pull request fixes it.

---

<div class="post-metadata">

**Author:** ![marast](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@marast](https://discourse.julialang.org/u/marast)\
**Post date:** [August 7, 2025, 8:13am UTC](https://discourse.julialang.org/t/glmakie-line-segments-missing-in-plot-of-large-data-set/131244/7 "2025-08-07T08:13:36Z")

</div>

For those who experienced a similar issue. The PR mentioned by nilshg was merged and is available in GLMakie v0.13.5. This fixes my problem.
