# Blank Heatmaps in GLMakie

**URL:** https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567
**Category:** Visualization
**Tags:** makie
**Created:** [May 21, 2021, 8:57am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567 "2021-05-21T08:57:16Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 8:57am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/1 "2021-05-21T08:57:16Z")

</div>

I’ve tried the recent exciting Makie update but heatmaps all seem to come out completely blank. E.g.

```julia
using GLMakie
fig = Figure()
ax = fig[1,1] = Axis(fig)
hm = heatmap!(ax,randn(5, 5), axis = (aspect = 1,))
Colorbar(fig[1,2], hm, width=25)

```

produces

 ![blankhm](https://global.discourse-cdn.com/julialang/original/3X/7/3/7359bb440bdb8415e73c254f15c3eb9777919ae1.png)  
I’m using Windows 10, GLMakie 0.3.0.  
Other features of the new update such as colour cycling and DataInspector are working fine (and very welcome - thanks!).  
Tony

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [May 21, 2021, 9:40am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/2 "2021-05-21T09:40:36Z")

</div>

I think the additional `axis` keyword in the heatmap call might mess this up, because the GLMakie backend doesn’t know what to do with it. You already have an axis, so you can’t pass an additional axis keyword. Pass the aspect to the Axis directly instead.

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 9:47am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/3 "2021-05-21T09:47:31Z")

</div>

My example is over-complicated because I copied the code fron the Makie announcement thread and also wanted to show that Colorbar still works. Just using

```julia
heatmap(rand(5, 5))

```

gives exactly the same problem.

---

<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 21, 2021, 10:05am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/4 "2021-05-21T10:05:50Z")

</div>

I just checked and I can’t reproduce it.  
Can you show the versions of Makie + GLMakie?

What could have happened is, that the new shader introduced one of those super annoying driver specific bugs…  
Can you show the output of `display(heatmap(rand(5, 5)))` ?

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 10:10am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/5 "2021-05-21T10:10:06Z")

</div>

In case it’s relevant, PlotlyJS seemed to be holding back the update so I had to remove it (something about WebIO versions, I think) before I could get the latest version of GLMakie.

I’ve tried deleting my .julia folder and re-instantiating but that didn’t help.

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 10:14am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/6 "2021-05-21T10:14:19Z")

</div>

```julia
[e9467ef8] GLMakie v0.3.0
[ee78f7c6] Makie v0.13.1

```

```julia
display(heatmap(rand(5, 5)))
GLMakie.Screen(...)

```

 ![blankhm2](https://global.discourse-cdn.com/julialang/original/3X/9/6/964b8535662b19bc2ecc94a2d4cc362f48dd25ee.png)

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [May 21, 2021, 10:21am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/7 "2021-05-21T10:21:08Z")

</div>

I also can’t reproduce 🤷‍♂️

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 10:29am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/8 "2021-05-21T10:29:03Z")

</div>

I have a UHD display using the Intel UHD graphics 630 with NVidia GTX 1650 on a Dell XPS15.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 21, 2021, 10:45am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/9 "2021-05-21T10:45:14Z")

</div>

I can reproduce the empty plot and I also have a Dell XPS175 with an NVIDIA card. And that’s probably the same reason why 3D scatter plots do not work too. As I mentioned in another thread this plots an empty axes

```julia
f = Figure(resolution = (1200, 800), fontsize = 14)
ax = Axis3(f[fldmod1(1, 2)...], aspect = (1,1,1));
scatter!(rand(10), rand(10), rand(10))

```

but oddly `surface` works

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 11:03am UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/10 "2021-05-21T11:03:40Z")

</div>

That plot’s blank for me as well.

---

<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 21, 2021, 12:50pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/11 "2021-05-21T12:50:56Z")

</div>

Is there really no output whatsoever if you do an explicit display(fig) or is everyone just omitting the printout?

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 21, 2021, 12:56pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/12 "2021-05-21T12:56:13Z")

</div>

Guess we are omitting the fig, This is what I get with the `scatter` example

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/0/505e2d5038abbeea8d85a943c6b74da584a8ec2e.png)

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 1:05pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/13 "2021-05-21T13:05:07Z")

</div>

The only output, apart from the picture itself, was:

```julia
julia> display(heatmap(rand(5, 5)))
GLMakie.Screen(...)

```

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [May 21, 2021, 1:14pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/14 "2021-05-21T13:14:40Z")

</div>

can you try really large marker sizes here like `markersize = 2000`? I think there’s a scaling issue with Axis3 and scatter specifically

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 1:25pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/15 "2021-05-21T13:25:30Z")

</div>

That gives me very tiny points. Making it bigger still

```julia
f = Figure()
ax = Axis3(f[fldmod1(1, 2)...], aspect = (1,1,1))
scatter!(rand(10), rand(10), rand(10), markersize = 2000*2)

```

gives

 ![ax3](https://global.discourse-cdn.com/julialang/original/3X/a/e/ae42ca4000437c3dc43f491cdca17c209e51a574.png)  
It doesn’t change the heatmap.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 21, 2021, 1:53pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/16 "2021-05-21T13:53:01Z")

</div>

Sorry to deviate a little but I’ll have to go soon and wanted to leave this other remark.  
This surface plot works fine (aside from me still having to figure out the tight memory layout for the matrices). It shows the Canary islands and coast of Africa from an unknown viewpoint, but that doesn’t matter here. What matters is that once displayed my GPU stays a 100% use and fan goes crazy even if I don’t touch the figure. That, I think, is a very killing feature, specially when run from laptops.

```julia
using GLMakie, GMT
f = Figure(resolution = (1200, 800), fontsize = 14)
ax = Axis3(f[fldmod1(1, 2)...], aspect = (1,1,0.1))
G = gmtread("mauritania.grd");
surface!(G.y, G.x, G.z)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/b/ab43d851f0d08e906bfc4b4f85d7f2cb82e8524a.jpeg)

---

<div class="post-metadata">

### Author: ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)
#### Post date: [May 21, 2021, 1:56pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/17 "2021-05-21T13:56:11Z")

</div>

Heatmaps also work for me. I do have the same issue with scatter on `Axis3` though. It looks fine with `LScene` though…

---

<div class="post-metadata">

### Author: ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)
#### Post date: [May 21, 2021, 2:00pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/18 "2021-05-21T14:00:45Z")

</div>

Hi @joa-quim. I had that problem with plots with lots of data and the solution given to me was to reduce the rate at which the plot is redrawn by something like

```julia
GLMakie.set_window_config!(framerate=2.0)

```

---

<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 21, 2021, 2:07pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/19 "2021-05-21T14:07:49Z")

</div>

> The only output, apart from the picture itself, was:

How annoying…that gives me very little to debug this obviously GPU driver dependent bug -.-

Can someone with this issue confirm, that the heatmap works on `GLMakie@0.2.9`?

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [May 21, 2021, 2:12pm UTC](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567/20 "2021-05-21T14:12:18Z")

</div>

Thanks @tt1234567 it does make a difference but not that much. Experimenting with this case showed that I need a framerate~=10 to have a smooth refresh, but with that the gpu usage is in the 70-80%

[Next page](https://discourse.julialang.org/t/blank-heatmaps-in-glmakie/61567.md?page=2)
