Skip to content

Instantly share code, notes, and snippets.

@trongan93
Created October 17, 2020 08:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save trongan93/29a2c39302a05b88e42bd650449109c7 to your computer and use it in GitHub Desktop.
# 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