Adjust hinge in cpt

It seems like -T has to be specified in order to change the hinge for a CPT with +h<new hinge>.
This is not mentioned in the makecpt (or grd2cpt) docs. Should it?

E.g.:

$ gmt makecpt -Cfes > col.cpt

$ gmt makecpt -Cfes+h0.6 > col_no_T.cpt

$ cmp col_no_T.cpt col.cpt                        # identical

$ gmt makecpt -Cfes+h0.6 -T0/1 > col_T.cpt

$ cmp col_T.cpt col.cpt
col_T.cpt col.cpt differ: byte 1, line 1          # differs

I just tried this smale example in PyGMT:

import pygmt

fig = pygmt.Figure()
fig.basemap(region=[-1, 1] * 2, projection="X5c", frame=1)

pygmt.makecpt(cmap="fes")
fig.colorbar(position="jTC+h+w4c", frame=True)

pygmt.makecpt(cmap="fes+h0.6")
fig.colorbar(position="jMC+h+w4c", frame=True)

pygmt.makecpt(cmap="fes+h0.6", series=[-1, 1])
fig.colorbar(position="jBC+h+w4c", frame=True)

fig.show()

And without setting -T or series the change of the hinge from 0 to 0.6 (+h0.6) is not considered.

Looking at the GMT docs for -C, it states not explicitly that -T is needed in case the hinge of the colormap should be changed. Maybe this is not mentioned, as in case makecpt is used to set up a colormap, normally a range (i.e., -T or series) is given for this colormap. Otherwise users can also directly pass the colormap name to the plotting modules.

Maybe it is logical that one should provide a -T when using -C+h, but it’s not intuitive for me.

I just submitted a small PR add this to the docs at DOC/makecpt: Mention -T is needed to change hinge via -C by yvonnefroehlich · Pull Request #9318 · GenericMappingTools/gmt · GitHub. Let’s see what the other think; for me it’s fine adding this to the docs.

Great! Thank you.