How in GRUtils or GLMakie to have the same range of colormap across plots?

I’m trying to compare distance functions looking at a heatmap of the distance matrix and can’t see anywhere in the documentation how to tell the plot function what the “range” of the data to apply to the colormap is.
i want the colormap to have range [0, 10] in each case…

so anything like

# or GLMakie, either way... 
> GRUtils.heatmap(randn(1000, 1000), range=[0, 10])

?

I have tried reading the documentation and looking it up here and could not easily find how to do this (or where to look for how to do this).

If it helps here are two examples:


You can see that one goes from 0-9 and the other from 0-7. that makes it hard to compare. I’d like 0-10 in each case.

using GLMakie
heatmap(randn(1000, 1000), colorrange=(0, 10))

Should do the trick!

2 Likes