Skip to content

Instantly share code, notes, and snippets.

@trongan93
Created October 17, 2020 08:42
Embed
What would you like to do?
# Show the direction of landslide
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(bf_cX, bf_cY, 'go')
# ax.text(bf_cY+1, bf_cX-2, 'center point of region - before landslide')
ax.plot(at_cX, at_cY, 'ro')
# ax.text(at_cY+1, at_cX+1, 'center point of region - before landslide')
# ax.arrow(bf_cX,bf_cY,at_cX-bf_cX+1,at_cY-bf_cY)
# ax.quiver(bf_cX,bf_cY,abs(at_cX-bf_cX),abs(at_cY-bf_cY))
ax.quiver(bf_cX,bf_cY,abs(at_cX-bf_cX),abs(at_cY-bf_cY), scale_units='xy', angles='xy', scale=1)
# ax.plot([bf_cX,at_cX],[bf_cY,at_cY])
ax.axis([0, 100, 0, 100])
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment