Created
June 8, 2023 02:39
-
-
Save Thomas-Moore-Creative/9c881f16e79531db347da14633084885 to your computer and use it in GitHub Desktop.
simple python quiver plot of ocean currents
This file contains 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
import matplotlib.pyplot as plt | |
# Define the x and y coordinates | |
x = [0, 1, 2, 3] | |
y = [0, 1, 2, 3] | |
# Define the u and v components of the currents | |
u = [1, 2, 3, 4] | |
v = [0, 1, 0, -1] | |
# Create the plot and add the quiver | |
fig, ax = plt.subplots() | |
ax.quiver(x, y, u, v) | |
# Display the plot | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment