Circle on a map

Hi,

I’d like to draw a circle of a given radius in km from a given point. How to do that?

Best,
Gio

you could try something like this

fig.plot(x=[(your lon)], y=[(your lat)], size=[(size in km)], style=“E-”, pen=“1.5p,white,–”)

Hi @esokos,

I tried but there’s definitely something I’m missing…
If I use the same radius (r = 3891 km), the circle which is drawn is way smaller than that I get with Google Earth, (see attachements).
Any idea?

Best,

Gio

code:

import pygmt
pygmt.config(MAP_FRAME_TYPE = 'plain')    # 'fancy' for thicker frame
fig.coast(
    region=[-180, 180, -70, 70],
    projection="M4i",
    frame=True,
    land = "gray",
    water="azure",
    shorelines=False,
    )

fig.plot(data=[9.4566, 40.4444, 3891], style='E-',pen="1.0p,blue",label = '3891 km radius')

fig.plot(x=9.4566,y= 40.4444,
         style='t0.1i',
         color='blue',
         pen='black')

fig.legend(position="JBL+jBL+o0.2c+w6c", box='+gwhite+p1p',)
fig.show()


map_events.pdf (49.0 KB)

I think I found the solution.

If I double the radius, the circle now matches the one from Google Earth.
So one should insert the DIAMETER of the circle rather than its radius.

Best,

Gio