Ploting LARGE heatmaps? Plots.jl in GPU?

Hi all.
I have this matrix that has a size of 3250x55650 and it is just a sample of my raw data.
I have a few files much larger.

I need to make heatmaps but Plots.jl is a bit slow on CPU when I run these lines

p1=heatmap(tticks,offset,strainrate,color=:viridis, clims=(-2000,2000))

Is it maybe a best way to handle very big matrix for fast plotting? Maybe plotting on GPU (I have a MacBook Air with an M1 Chip).

Thanks in advance :slight_smile:


1 Like

Never tried Makie. Is it fast and does it work with GPU?

GLmakie uses the GPU and should be quite fast although I have never used it on this kind of scale

Fyi, the InteractiveViz package looks very interesting.

It takes ~1 s to display a 3250 x 55650 heatmap (~180M points, not all displayed as it is pointless) and zooming in and out is instantaneous (bringing more points in, as needed):

using InteractiveViz, GLMakie
strainrate = sind.((1:3250) .* (1:55650)'/5e4)
iheatmap(strainrate; cursor=true)

with interactive zoom-in and cursor info:


Does it have 3D?


1 Like

This is great but there are some limitations like no color bar :frowning:

Not really working on my computer (MacBook Air M1) getting this error when using large data sets:
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 1 GLD_TEXTURE_INDEX_1D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

Indeed, but I guess fixing it should be a piece of cake for the Makie gurus.

Now I can’t run the code anymore, I get errors:

ERROR: No backend available (GLMakie, CairoMakie, WGLMakie)!

But I think the following commands add a colorbar on the left side:

fig = Figure()
iheatmap(strainrate; cursor=true); 
Colorbar(fig[1,-1], limits=(-1, 1), colormap=:viridis, flipaxis=false)

Perhaps some left padding can be added to the plot.

Did not work for me :frowning:

Colorbar(fig[-1,-1], limits=(-1, 1), colormap=:viridis, flipaxis=false)

Produces a colorbar, but it is on top of the y-axis:

1 Like

It worked this time. I was trying to link it to Axis in Makie, but it didn´t work. It is a great package, it is a shame it is still in development hehe. Thanks @rafael.guerra