# Blank images and "dead pixels" in Makie

**URL:** <https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609>\
**Category:** Visualization\
**Tags:** package, graphics, visualization\
**Created:** [September 10, 2019, 3:15pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609 "2019-09-10T15:15:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 10, 2019, 3:15pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/1 "2019-09-10T15:15:28Z")

</div>

I run into blank images and “dead pixels” when running [this](https://simondanisch.github.io/ReferenceImages/gallery/comparing_contours,_image,_surfaces_and_heatmaps/index.html) Makie example (see below).

The bottom-center image is blank, while the bottom-right image has a “dead pixel” at the bottom-right corner; hard to see, but it is there and does not follow the smooth gradient of the rest of the plot.

I also have another MWE that produces this same “dead pixel” phenomena, and they seem to occur with heatmaps near the center and edges of the figures.

Has anyone run into this issue before? Appreciate the support!

 ![Capture](https://global.discourse-cdn.com/julialang/original/3X/6/7/67cbf10df88b1e9a0ddc3bdb67b9deecafacdf78.png)

---

<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:** [September 10, 2019, 3:18pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/2 "2019-09-10T15:18:41Z")

</div>

That’s pretty odd… What is your OS, julia and Makie/GLMakie/AbstractPlotting version?

---

<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:** [September 10, 2019, 3:21pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/3 "2019-09-10T15:21:58Z")

</div>

Also does it always happen, or is it more of a corruption?

---

<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:** [September 10, 2019, 3:23pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/4 "2019-09-10T15:23:27Z")

</div>

You should also try running this:

```julia
julia> ENV["MODERNGL_DEBUGGING"] = "true"
julia>]add ModernGL#master
julia>]build ModernGL

```

Restart Makie and try again…

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 10, 2019, 3:35pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/5 "2019-09-10T15:35:32Z")

</div>

Win 10 Pro, Julia v1.2.0 (on Atom 1.40.1), Makie v0.9.5 #master.

“build ModernGL” produced no changes and the plots look the same after Atom/Makie restart.

I’ve also tried reinstalling Makie.

I’ve tried many more Makie examples and I can’t get them to fail. The issue seems to be with 2D plots.

---

<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:** [September 10, 2019, 3:40pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/6 "2019-09-10T15:40:29Z")

</div>

Makie version isn’t important, GLMakie/AbstractPlotting is 😉

> “build ModernGL” produced no changes and the plots look the same after Atom/Makie restart.

So you have all the visual errors, but no further debug information is displayed?

Is this printing:

```julia
using ModernGL
joinpath(dirname(pathof(ModernGL)), "..", "deps", "deps.jl") |> read |> String

```

`"const enable_opengl_debugging = true"`?

What GPU do you have?

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 10, 2019, 3:48pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/7 "2019-09-10T15:48:46Z")

</div>

GLMakie v0.0.7, AbstractPlotting v0.9.10

```julia
using ModernGL
joinpath(dirname(pathof(ModernGL)), "..", "deps", "deps.jl") |> read |> String

```

prints

> “const enable\_opengl\_debugging = true\n”

Visual errors persist with no further debug information printed.

My GPU is Radeon HD 6800.

---

<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:** [September 10, 2019, 3:51pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/8 "2019-09-10T15:51:00Z")

</div>

Of course, it’s AMD with their messy drivers -.-  
I will see if I can reproduce it at home with an AMD gpu…

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 10, 2019, 3:52pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/9 "2019-09-10T15:52:26Z")

</div>

That’s both funny and sad…I appreciate the support, @sdanisch.

I’ve run the same code on a laptop with Intel GPU with none of these issues.

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 11, 2019, 3:37pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/10 "2019-09-11T15:37:19Z")

</div>

Another data point with a MWE:

```julia
using Makie#master 
x = range(-1,stop=1,length=100)
y = x'
A = x.^2 .+ y.^2 .< 0.5^2
scene = image(A,scale_plot=false)
sc_t = title(scene,"Image")

```

“Image” displays properly, but it is not ideal because it interpolates the image.  
“Heatmap” displays nothing at all.

 ![Picture1](https://global.discourse-cdn.com/julialang/original/3X/c/f/cf9c6afaaf5cfc41825829677b2c976b78ef11f7.png)

---

<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:** [September 11, 2019, 3:41pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/11 "2019-09-11T15:41:31Z")

</div>

oh… can you try `scene = heatmap(A,scale_plot=false, interpolate = true)`?

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 11, 2019, 3:43pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/12 "2019-09-11T15:43:48Z")

</div>

Hmm…

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

---

<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:** [September 11, 2019, 4:03pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/13 "2019-09-11T16:03:17Z")

</div>

That’s pretty interesting!  
Can you try:

```julia
A = reshape(repeat(1:10, 10), 10, 10)
colors = Colors.distinguishable_colors(11)[2:end]
scene = heatmap(A,scale_plot=false, interpolate = true, colormap = colors)
scene = heatmap(A,scale_plot=false, interpolate = false, colormap = colors)

```

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 11, 2019, 4:15pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/14 "2019-09-11T16:15:27Z")

</div>

Came up in Juno Plot pane and separate Makie window:

 ![Picture1](https://global.discourse-cdn.com/julialang/original/3X/c/f/cfa6fd202dbbd408409e7dd9a0c75a2fed6bf488.png)

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 11, 2019, 4:25pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/15 "2019-09-11T16:25:41Z")

</div>

Tried removing the Boolean threshold to plot the “analog” pattern, and the center/corner pixels are back:

```julia
x = range(-1,stop=1,length=100)
y = x'
A = x.^2 .+ y.^2

```

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

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 11, 2019, 4:35pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/16 "2019-09-11T16:35:32Z")

</div>

One consistent issue I’ve found is that if I define or print the array in REPL **after** opening a Makie scene, I get a ton of errors in the REPL.

They start with “UndefVarError: warn not defined”, “Stacktrace: glBindBuffer”, etc.

Lots of errors from ModernGL and GLAbstraction.

This only happens when the array A is defined/printed in REPL after calling a Makie scene window.

---

<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:** [September 11, 2019, 8:34pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/17 "2019-09-11T20:34:38Z")

</div>

Oh wow… So that’s why there are no warnings with debugging enabled:  
[https://github.com/JuliaGL/ModernGL.jl/blob/e1eb1b60fbd9b16c09e976901ddcd05ddd69f75b/src/functionloading.jl#L16](https://github.com/JuliaGL/ModernGL.jl/blob/e1eb1b60fbd9b16c09e976901ddcd05ddd69f75b/src/functionloading.jl#L16)  
I just fixed it directly on master… so could you fetch `]add ModernGL#master` and try again? Also make sure that the `ENV` is still set to debugging 😉

---

<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:** [September 11, 2019, 9:00pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/18 "2019-09-11T21:00:23Z")

</div>

Finally got a chance to try this with my AMD desktop…Can’t reproduce it… So hopefully you can get the warnings after checking out ModernGL#master… Maybe you can also check if you have the newest drivers? I remember there were different ways to make sure that you have the newest AMD drivers on windows,and some would leave you with old drivers… Maybe that’s the issue!

---

<div class="post-metadata">

**Author:** ![dalarev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dalarev/32/9881_2.png) [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Post date:** [September 11, 2019, 9:26pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/19 "2019-09-11T21:26:35Z")

</div>

Alright, fetched the latest ModernGL#master and confirmed that ENV is set to debugging.

```julia
x = range(-1,stop=1,length=100)
y = x'
A = x.^2 .+ y.^2 .< 0.5^2
scene = heatmap(A,scale_plot=false)

```

Still shows as a black square. There are no errors once I run the script, but a flood of errors once I type pretty much anything into the REPL.

I saved the warnings from the REPL after typing “A” but it is a pretty long list. Is there a way to upload a text file or should I just paste it here?

---

<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:** [September 11, 2019, 9:29pm UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609/20 "2019-09-11T21:29:13Z")

</div>

[gist.github.com](http://gist.github.com)? If it’s just always the same, maybe condense it?

[Next page](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609.md?page=2)
