# Makie/CairoMakie custom colorbar ticks (\> and \<)

**URL:** <https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460>\
**Category:** Visualization\
**Tags:** cairomakie\
**Created:** [October 1, 2023, 10:11am UTC](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460 "2023-10-01T10:11:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JonasWickman](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JonasWickman](https://discourse.julialang.org/u/JonasWickman)\
**Post date:** [October 2, 2023, 3:34pm UTC](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460/2 "2023-10-02T15:34:02Z")

</div>

You can adjust the ticks and ticklabels of colorbars in (at least) two ways. At construction:

```julia
xs = ys = range(-1, 1, length = 101)
Z = xs.^2 .+ ((ys)').^2
fig = Figure()
ax = Axis(fig[1,1])
hm = heatmap!(ax, xs, ys, Z)
cbar = Colorbar(fig[1,2], hm; ticks = ([0.5,1.0,1.5], ["Low","Medium","High"]))
fig

```

or after construction:

```julia
cbar.ticks[] = ([0.5,1.0,1.5], ["0.5","1.0","1.5"])

```

I could not fully understand what problem you are trying to solve specifically, please provide an MWE ([Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)) if the above is not sufficient to solve your problem.

---

_[View the full topic](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460)._
