Colorbar label location

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!

example

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

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

1 Like

Many thanks, Paul! It works.

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