Change font (color/size) of Compass rose text


Can I somehow change the font (color/size) of the compass rose text?

import pygmt
fig = pygmt.Figure()
fig.basemap(region="g", projection="W15c", frame=True)


Hello @duffy6,

unfortunately, your code example does not work for me. Thus, I wrote one on my own. I am able to change the font style and color of the rose labels by adjusting the GMT defaults using pygmt.config. However, the font size passed to the FONT parameter does not affect the font size of the rose labels. Currently, I do not know why this is.

import pygmt as gmt

size = 10

fig = gmt.Figure()
fig.basemap(region=[-size, size, -size, size], projection=f"M{size}c", frame=True)

with gmt.config(FONT="20p,Times-Italic,red"): 
# fig.savefig("rose_change_font.png")

Output figure

1 Like