Some body please help me using pygmt, projecting hypocenter to A-A1 line and to plot the cross-section along A-A1.
The following is my pygmt script and the resulting figure.
Thank…
import pygmt
import pandas as pd
data=pd.read_csv("G:/LAT_JUPYTER/PyGMT/sumatra_eq.csv")
fig = pygmt.Figure()
fig.basemap(region=[94, 108, -7, 7], projection="M8i", frame="a2g")
fig.coast(shorelines="1.5p,black")
fig.plot(
x=data.longitude,
y=data.latitude,
size=0.15*data.magnitude,
style="cc",
color="red",
pen="black")
fig.plot(x=[96,103],y=[-3,2],pen="2p,black")
fig.text(text="A", x=95.5, y=-3, font="24p,Helvetica-Bold,black")
fig.text(text="A1", x=103.2, y=2.5, font="24p,Helvetica-Bold,black")
pygmt.project(output="cross.dat",
x=data.longitude,
y=data.latitude,
z=data.depth,
center=["-C96/-3"],
endpoint=["-E103/2"],
width="-W-100/100")
fig.show()
fig.savefig("G:/LAT_JUPYTER/PyGMT/sumatra.pdf")