可用于绘制多操作步骤的中间要素,比如
#coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
aa = np.loadtxt('hypoDD_sort.reloc')
fig, ax = plt.subplots()
ax.scatter(aa[:,2],aa[:,1],marker='o',s=1,color='r')
pts=plt.ginput(n=-1,timeout=-1)
# plot the first profile
x = [pts[0][0], pts[1][0]]
y = [pts[0][1], pts[1][1]]
ax.plot(x,y,color = 'k')
plt.draw()
pts=plt.ginput(n=-1,timeout=-1)
# plot the second profile
x = [pts[0][0], pts[1][0]]
y = [pts[0][1], pts[1][1]]
ax.plot(x,y,color = 'k')
plt.draw()
plt.show()