# Remove Colorbar ticks

**URL:** <https://discourse.julialang.org/t/remove-colorbar-ticks/91675>\
**Category:** New to Julia\
**Tags:** plots, gr\
**Created:** [December 15, 2022, 5:03am UTC](https://discourse.julialang.org/t/remove-colorbar-ticks/91675 "2022-12-15T05:03:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmed](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@ahmed](https://discourse.julialang.org/u/ahmed)\
**Post date:** [December 15, 2022, 5:03am UTC](https://discourse.julialang.org/t/remove-colorbar-ticks/91675/1 "2022-12-15T05:03:40Z")

</div>

I’m using heatmap() in Plots.jl in the gr() backend and I want to remove the ticks and numbers that comes automatically with the colorbar. Is there a way to do that?

---

<div class="post-metadata">

**Author:** ![Ininterrompue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ininterrompue/32/5594_2.png) [@Ininterrompue](https://discourse.julialang.org/u/Ininterrompue)\
**Post date:** [December 15, 2022, 6:56am UTC](https://discourse.julialang.org/t/remove-colorbar-ticks/91675/2 "2022-12-15T06:56:11Z")

</div>

Assuming `zmin` is the minimum value of data in `z`, you could do

```julia
heatmap(x, y, z, colorbar_ticks=([zmin], [""]))

```

but someone else might have something more elegant.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 15, 2022, 12:09pm UTC](https://discourse.julialang.org/t/remove-colorbar-ticks/91675/3 "2022-12-15T12:09:24Z")

</div>

This limitation of the `gr()` backend doesn’t seem to have been fixed yet.  
With the pyplot() backend we have several options, including: `colorbar_ticks=false`.

Also, the previous suggestion didn’t work for me with `gr()`.

If we cannot unplot it, we can perhaps hide it:

```julia
using Plots; gr()
x, y = 0:10, -5:5
p = heatmap(x, y, 10rand(11,11))
for yi in range(extrema(y)..., 20)
    annotate!(maximum(x)+ 1.93, yi, text("██", :white, 30))
end
p

```

![Plots_gr_masking_colorbar_ticks](https://global.discourse-cdn.com/julialang/original/3X/5/e/5e588906eb528517bd06a8a03cb3509b619cfd82.png)
