import pygmt fig = pygmt.Figure() # Add a coastline layer fig.coast(region=[-180, 180, -90, 90], projection='Winkel', land='white', water='lightblue', shorelines='1/0.25p') # Add a scatter plot layer x_coords = [0, 20, 40, 60] y_coords = [10, 30, 50, 70] fig.plot(x=x_coords, y=y_coords, style='c0.3c', color='red') fig.show()
import pygmt fig = pygmt.Figure() # Add a basemap layer fig.basemap(region=[-10, 10, -10, 10], projection='X10c/10c', frame='ag') # Add a symbol layer fig.plot(x=0, y=0, style='t0.1i', color='red') # Add a label layer fig.text(x=0, y=0, text='This is a label!', font='10p,Helvetica-Bold,black') fig.show()In this example, a Pygmt Figure object is created and a basemap layer, symbol layer, and label layer are added. The `show()` method is used to display the figure. This example uses the Pygmt package library.