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

**URL:** <https://discourse.julialang.org/t/how-in-grutils-or-glmakie-to-have-the-same-range-of-colormap-across-plots/52422>\
**Category:** Visualization\
**Created:** [December 26, 2020, 9:11pm UTC](https://discourse.julialang.org/t/how-in-grutils-or-glmakie-to-have-the-same-range-of-colormap-across-plots/52422 "2020-12-26T21:11:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vshesh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vshesh/32/20362_2.png) [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Post date:** [December 26, 2020, 9:11pm UTC](https://discourse.julialang.org/t/how-in-grutils-or-glmakie-to-have-the-same-range-of-colormap-across-plots/52422/1 "2020-12-26T21:11:32Z")

</div>

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

```julia
# 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:

 ![Screen Shot 2020-12-26 at 1.12.18 PM](https://global.discourse-cdn.com/julialang/original/3X/5/c/5c2d1a063c0d59af63a08fb5054741a9bf2130d7.jpeg)  
 ![Screen Shot 2020-12-26 at 1.12.14 PM](https://global.discourse-cdn.com/julialang/original/3X/0/e/0e9bdf1f6fcd21b3d08d11bd0de3d13d6e0a3c66.jpeg)

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.

---

<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:** [December 26, 2020, 9:24pm UTC](https://discourse.julialang.org/t/how-in-grutils-or-glmakie-to-have-the-same-range-of-colormap-across-plots/52422/2 "2020-12-26T21:24:43Z")

</div>

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

```

Should do the trick!
