# Makie datashader color corruption

**URL:** https://discourse.julialang.org/t/makie-datashader-color-corruption/129460
**Category:** Visualization
**Tags:** glmakie
**Created:** [May 30, 2025, 9:07am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460 "2025-05-30T09:07:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![cmarcotte](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)
#### Post date: [May 30, 2025, 9:07am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/1 "2025-05-30T09:07:34Z")

</div>

Hello,

I am running into a bizarre coloration issue with Makie (GLMakie) with the datashader – this leads to a bright blue color on-screen, while the saved figure is red (as it is in the example).

Additionally, the on-screen color has these unusual tiles in a consistent but not obviously meaningful arrangement where the color is red.

Below is a screenshot from the [Taxi data datashader example](https://docs.makie.org/stable/reference/plots/datashader#Bigger-examples) run in a new temporary session:

 ![Screenshot from 2025-05-30 09-53-25](https://global.discourse-cdn.com/julialang/original/3X/4/d/4de03aa6de446f6e31eb00ba0ed35c47678efffc.jpeg)

While this is the saved output (kindly forgive the sizing issues) with the expected color:

 ![datashader_color](https://global.discourse-cdn.com/julialang/original/3X/a/8/a86882ee6f925929de414d7588aa05af5b0c1465.png)

Configuration details below:

```julia
julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver4)
Threads: 32 default, 0 interactive, 16 GC (on 32 virtual cores)

```

and

```sh
▶ nvidia-smi
Fri May 30 10:02:35 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.133.07 Driver Version: 570.133.07 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 Off | 00000000:01:00.0 On | N/A |
| 0% 47C P8 N/A / 115W | 547MiB / 8192MiB | 1% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 3508 G /usr/bin/gnome-shell 468MiB |
| 0 N/A N/A 177797 C+G missioncenter 31MiB |
+-----------------------------------------------------------------------------------------+

```

My question is if this is an issue with the shader in the datashader, an issue with (GL)Makie, or an issue somewhere deeper in the stack (e.g. driver, OS, hardware) and what information should I gather to try and identify it?

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [May 30, 2025, 9:16am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/2 "2025-05-30T09:16:30Z")

</div>

Is this via x forwarding? We’ve seen reports of some weird color problems looking a lot like what you see when using x-forwarding.  
We still haven’t found the root for that, but saving the output fixing the issue is kind of interesting!  
Did you try passing `async=false` ? That _may_ fix the sizing issue when saving.

---

<div class="post-metadata">

### Author: ![cmarcotte](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)
#### Post date: [May 30, 2025, 9:23am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/3 "2025-05-30T09:23:44Z")

</div>

There’s no x-forwarding, and I am using Wayland on Ubuntu. I don’t understand the systems well enough to identify the source of the issue in there but I am happy to run things to help.

Indeed, passing `async=false` to the `datashader(...)` does fix the saving size.  
To be clear, the saved output is correctly colored, but the window remains with this tiled color issue.

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [May 30, 2025, 9:28am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/4 "2025-05-30T09:28:59Z")

</div>

Ok, interesting.. Can you make sure you’re using hardware accelerated OpenGL and not llvmpipe?  
Try:

```julia
using GLMakie
using GLMakie.ModernGL
display(scatter(1:4))
# the below needs an open GLMakie window
renderer = unsafe_string(glGetString(GL_RENDERER))

```

---

<div class="post-metadata">

### Author: ![cmarcotte](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)
#### Post date: [May 30, 2025, 9:36am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/5 "2025-05-30T09:36:23Z")

</div>

Looks like it is, indeed, LLVMpipe:

```julia
julia> renderer = unsafe_string(glGetString(GL_RENDERER))
"llvmpipe (LLVM 19.1.1, 256 bits)"

```

Is this a fallback when there’s a misconfigured OpenGL on the machine?

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [May 30, 2025, 9:38am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/6 "2025-05-30T09:38:04Z")

</div>

Yup! That’s it then… I guess you’ll need to find out how to get your nvidia gpu to take over for your linux distro.  
There should be quite a few tips online on how to fix this.

---

<div class="post-metadata">

### Author: ![cmarcotte](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@cmarcotte](https://discourse.julialang.org/u/cmarcotte)
#### Post date: [May 30, 2025, 9:39am UTC](https://discourse.julialang.org/t/makie-datashader-color-corruption/129460/7 "2025-05-30T09:39:35Z")

</div>

A timeless lesson reaffirmed: it’s nvidia’s fault. Thank you for your help @sdanisch and thanks to the Makie team for making figures fun.
