diff --git a/doc/rst/source/colorbar.rst b/doc/rst/source/colorbar.rst index 4ce285a4a8a..502ecb806f3 100644 --- a/doc/rst/source/colorbar.rst +++ b/doc/rst/source/colorbar.rst @@ -18,6 +18,7 @@ Synopsis [ |-D|\ *refpoint* ] [ |-F|\ *panel* ] [ |-G|\ *zlo*\ /\ *zhi* ] +[ |-H| ] [ |-I|\ [*max\_intens*\|\ *low_i*/*high_i*] ] [ |-J|\ *parameters* ] [ |-J|\ **z**\|\ **Z**\ *parameters* ] @@ -54,8 +55,8 @@ widths. The font used for the annotations along the scale is specified by bar is controlled by :term:`FONT_ANNOT_SECONDARY`. If a label along the bar is requested, it is plotted with :term:`FONT_LABEL`. But mind you that the modern mode theme scales down the size of annotations and labels based on the colorbar length for improved legibility. So, in modern mode scripts it might look that these -parameter settings are not working correctly. If you may want to increase font sizes to compensate the -scaling effect the solution is to use the online ``--FONT_ANNOT_PRIMARY=...`` construct. +parameter settings are not working correctly. If you want to have full control on font sizes and overcome +the auto-scaling, use option |-H|. For a full overview of CPTs, see the Technical Reference section on :ref:`Color palette tables `. .. figure:: /_images/GMT_colorbar.* @@ -162,6 +163,12 @@ Optional Arguments we leave that end of the CPT alone. The truncation takes place before the plotting. +.. _-H: + +**-H** + From GMT 6.5 on, colorbar annotation fonts are auto-scaled. Use this option to prevent that effect + and let user set fonts as they wish. + .. _-I: **-I**\ [*max_intens*\|\ *low\_i*/*high_i*] diff --git a/doc/rst/source/psscale.rst b/doc/rst/source/psscale.rst index fca93fd91f1..2f1ea494ec1 100644 --- a/doc/rst/source/psscale.rst +++ b/doc/rst/source/psscale.rst @@ -18,6 +18,7 @@ Synopsis [ |-D|\ *refpoint* ] [ |-F|\ *panel* ] [ |-G|\ *zlo*\ /\ *zhi* ] +[ |-H| ] [ |-I|\ [*max\_intens*\|\ *low_i*/*high_i*] ] [ |-J|\ *parameters* ] [ |-K| ] diff --git a/src/psscale.c b/src/psscale.c index 58ee3ec86c5..cec5de88012 100644 --- a/src/psscale.c +++ b/src/psscale.c @@ -101,6 +101,9 @@ struct PSSCALE_CTRL { bool active; double z_low, z_high; } G; + struct PSSCALE_H { /* -H */ + bool active; + } H; struct PSSCALE_I { /* -I[|/] */ bool active; double min, max; @@ -167,13 +170,13 @@ static void Free_Ctrl (struct GMT_CTRL *GMT, struct PSSCALE_CTRL *C) { /* Deallo gmt_M_free (GMT, C); } -static int usage (struct GMTAPI_CTRL *API, int level) { +static int usage(struct GMTAPI_CTRL *API, int level) { /* This displays the psscale synopsis and optionally full usage information */ const char *name = gmt_show_name_and_purpose (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_PURPOSE); if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR); GMT_Usage (API, 0, "usage: %s [%s] [-C] [-D%s[+w[/]][+e[b|f][]][+h|v][+j][+ma|c|l|u][+n|N[]]%s[+r]] " - "[-F%s] [-G/] [-I[|/]] [%s] %s[-L[i|I][]] [-M] [-N[p|]] %s%s[-Q] [%s] " + "[-F%s] [-G/] [-H] [-I[|/]] [%s] %s[-L[i|I][]] [-M] [-N[p|]] %s%s[-Q] [%s] " "[-S[+a][+c|n][+r][+s][+x