Created
October 17, 2020 08:42
-
-
Save trongan93/29a2c39302a05b88e42bd650449109c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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