gmt icon indicating copy to clipboard operation
gmt copied to clipboard

label font for colorbar is smaller than FONT_LABEL?

Open tomeracles opened this issue 4 months ago • 12 comments

I am using GMT 6.5.0 so apologies if this is already fixed (or not a bug).

Description of the problem

When setting the font size for my colorbar label with --FONT_LABEL it renders as smaller than if I used the same font with pstext. Is this intended? I can change the size with --FONT_LABEL, it's just that the actual sizes don't seem to match up.

(From testing it seems that setting axis labels on the main plot, e.g. in psbasemap -Bx+l, results in the same size text as pstext gives me, so it is colorbar that is producing a smaller font than specified with FONT_LABEL.)

Full script that generated the error

gmt begin labeltest png
gmt grdimage @earth_relief_01m -R-10/10/48/60 -Coleron -JM10c -BneSW -Bxaf -Byaf
gmt colorbar -Bxa1000+l"Elevation (m)" --FONT_LABEL=20p,Helvetica
echo "Elevation (m)" |  gmt text -F+f20p,Helvetica+cBC -D0/-3c -N
gmt end

Actual outcome

Image

Expected outcome

I would expect the two lines of text saying "Elevation (m)" to be the same size, since they are both set to 20p,Helvetica as far as I can tell.

System information

  • Operating system: Debian GNU/Linux 12 (bookworm)
  • GMT version (gmt --version): 6.5.0

tomeracles avatar Sep 16 '25 10:09 tomeracles