# Colorbar label location

**URL:** <https://forum.generic-mapping-tools.org/t/colorbar-label-location/2254>\
**Category:** GMT.jl Q&A\
**Tags:** gmt\
**Created:** [November 3, 2021, 7:50pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-label-location/2254 "2021-11-03T19:50:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon6j](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@leon6j](https://forum.generic-mapping-tools.org/u/leon6j)\
**Post date:** [November 3, 2021, 7:50pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-label-location/2254/1 "2021-11-03T19:50:59Z")

</div>

Below is my colorbar statement. Right now, my colorbar is horizontal, and it is located at the bottom of my plot. My colorbar label “test” is located to the right end of the horizontal colorbar, making it look very silly. Does anyone know how I could move my colorbar label to below my colorbar?

```
cpt2 = makecpt(cmap=:jet, range=(0,5,0.5));
colorbar!(pos=(anchor=:BC,length=(12.5,0.6), offset=(0,1.0)),
          color=cpt2, frame=(ylabel="test",),
          fmt=:jpg, show=1)

```

Many thanks!

---

<div class="post-metadata">

**Author:** ![leon6j](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@leon6j](https://forum.generic-mapping-tools.org/u/leon6j)\
**Post date:** [November 3, 2021, 9:19pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-label-location/2254/2 "2021-11-03T21:19:13Z")

</div>

![example](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/c/c672139bc7e30e261397c23a9c327b779ad1c0d2.png)

Here is an example of what it looks like now. I just want to move the label “test” to below the horizontal colorbar.

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [November 3, 2021, 9:31pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-label-location/2254/3 "2021-11-03T21:31:12Z")

</div>

Look for the title or x-label option and not y-label.

---

<div class="post-metadata">

**Author:** ![leon6j](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@leon6j](https://forum.generic-mapping-tools.org/u/leon6j)\
**Post date:** [November 3, 2021, 11:21pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-label-location/2254/4 "2021-11-03T23:21:07Z")

</div>

Many thanks, Paul! It works.

I remember trying that myself previously and it did not work. Glad it is working now.
