# Colorbar: customised annotation

**URL:** <https://forum.generic-mapping-tools.org/t/colorbar-customised-annotation/1885>\
**Category:** PyGMT Q&A\
**Created:** [July 10, 2021, 2:48pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-customised-annotation/1885 "2021-07-10T14:48:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGermanSquirrel](https://avatars.discourse-cdn.com/v4/letter/t/e47774/32.png) [@TheGermanSquirrel](https://forum.generic-mapping-tools.org/u/TheGermanSquirrel)\
**Post date:** [July 10, 2021, 2:48pm UTC](https://forum.generic-mapping-tools.org/t/colorbar-customised-annotation/1885/1 "2021-07-10T14:48:51Z")

</div>

Hi,

I would like to adjust the colorbar below to show -X on the left and a zero below the center.

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

I managed to get the X by using:

```
fig.colorbar(...
frame=["y+lX"] 
...)

```

How can I annotate `-X` at the other end of the colorbar and a 0 in the center?

My other idea was to use the -L option GMT has to customise the labels by adding a semi-colon and the label name at the end of a line in the CPT file (as shown [here](https://docs.generic-mapping-tools.org/6.2/cookbook/cpts.html)). However, it looks like the -L option is not yet implemented in pygmt…?

Any help is much appreciated!

---

<div class="post-metadata">

**Author:** ![Anirban](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Anirban](https://forum.generic-mapping-tools.org/u/Anirban)\
**Post date:** [July 11, 2021, 5:16am UTC](https://forum.generic-mapping-tools.org/t/colorbar-customised-annotation/1885/2 "2021-07-11T05:16:26Z")

</div>

for the colorbar you faced two problems:

1. -X on the left : There is not any direct command to to do this. you can use text command to this  
Example:  
gmt text -F+a0+f20p,Times-Bold,black -N \<\<- LINEEND  
 X  
LINEEND

2. For that value zero:  
gmt colorbar -Dx1i/-1c+w3i/0.5c+h -C -Bx+l0

or you can use the previous trick. Only you have to give the CPT file name and the latitude and longitude value
