Change font (color/size) of Compass rose text

Hi!

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)
fig.basemap(rose="jRB+w2c+f1+lW,O,S,N")
fig.savefig("_meine_einfache_Karte.pdf")

Regards

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.basemap(rose="jMC+w2c+f1+lW,O,S,N")

fig.show()
# fig.savefig("rose_change_font.png")

Output figure

1 Like