How to set default parameters in PyGMT?

Is there a standard way how to set the default parameters like FONT_ANNOT_PRIMARY etc. using PyGMT? I read about some suggestions regarding that topic on GitHub but currently I’m not sure how to set the different parameters.

Not at the moment. There has been some work in progress code at but it has not been merged into master yet. Are you trying to just change the font sizes/colours?

Good to know :wink: Yes my main problem was to change the fontsize of the colorbar and the map frame annotations. Does any workaround exist for this issue at the moment?

Not exactly the best way, but I usually just change the scale of the map projection (e.g. from projection="x1:30000" to projection="x1:60000").

I use this workaround to call gmtset directly.

import pygmt
with pygmt.clib.Session() as session:
    session.call_module('gmtset', 'FONT 11p')
    session.call_module('gmtset', 'MAP_FRAME_TYPE fancy')
1 Like

Thanks for your answers, the latter one works fine for me until the “offical” way how to do it will be implemented :wink: