Skip to content

Instantly share code, notes, and snippets.

@Thomas-Moore-Creative
Created June 8, 2023 02:39
Show Gist options
  • Save Thomas-Moore-Creative/9c881f16e79531db347da14633084885 to your computer and use it in GitHub Desktop.
Save Thomas-Moore-Creative/9c881f16e79531db347da14633084885 to your computer and use it in GitHub Desktop.
simple python quiver plot of ocean currents
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