I will ask probably a very simple question regarding the colorbar. Nevertheless, I couldn’t come up with a solution by reading the documentation.
I want to be able to set a colorbar length to any desired percentage relative to the map side in PyGMT. In the GMT docs, it is written that the length is set to 80% of the map side, so I was wondering if there is a possibility to change that to any desired value, e.g. 100%?
With the only difference that the colorbar length is now set to 10 centimeters, and the width is adjusted accordingly to be 4% of the length (default setting).
Also, in the particular case you want a 100% scale, you could use the width of map.
For example, willschlitzer indicated a 15 cm map width (M15c), so the same value could be use for the colorbar position="+w15h").
This only works if you want to plot an horizontal colorbar. If you want to define the width and you want a vertical colorbar or vice versa), then you need mapproject.