Colorbar: customised annotation


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

I managed to get the X by using:


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). However, it looks like the -L option is not yet implemented in pygmt…?

Any help is much appreciated!

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
    gmt text -F+a0+f20p,Times-Bold,black -N <<- 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