Hi
I’m plotting multiple colorbars side-by-side with different widths, and having trouble where the annotation size seems to scale with the colorbar width. I’ve done a lot of googling and a lot of trial and error and can’t seem to get the annotation sizes consistent. Below is an example:
import pygmt
pygmt.makecpt(cmap='batlow', series=[-50,40],background=True, output='cpt1.cpt')
cpt1 = 'cpt1.cpt'
cpt2 = pygmt.makecpt(cmap='polar', series=[-20,20], background=True,output='cpt2.cpt')
cpt2 = 'cpt2.cpt'
fig = pygmt.Figure()
pygmt.config(MAP_FRAME_TYPE="plain")
pygmt.config(FONT_ANNOT="8p")
with fig.subplot(
nrows=1,
ncols=4,
figsize=(f"18c", f"12c"),
sharex="b",
sharey="l",
frame=['WSne','xa120f60','ya60f60']
):
fig.basemap(region='d', projection='Q?', panel=True)
fig.colorbar(cmap=cpt1, position="jBL+o0c/-0.9c+w8.8c/0.25c+h", frame=["a20f5", "x+lTemperature"])
fig.basemap(region='d', projection='Q?', panel=True)
fig.basemap(region='d', projection='Q?', panel=True)
fig.colorbar(cmap=cpt2, position="jBL+o0c/-0.9c+w4.2c/0.25c+h", frame=["a10f2", "x+lDiff"])
fig.basemap(region='d', projection='Q?', panel=True)
fig.colorbar(cmap=cpt2, position="jBL+o0c/-0.9c+w4.2c/0.25c+h", frame=["a10f2", "x+lDiff"])
fig.show()
And the result:
As you can see, the right two colorbars have smaller fonts than the left. Any idea how I can rectify this?
Thank you!