Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- x = np.arange(50,91,2)
- y = np.arange(-180,181,15)
- Y, X = np.meshgrid(y,x)
- var = np.random.rand(2,len(x),len(y))
- lat = (X - 90) *-1
- lon = (Y)*np.pi/180
- fig, ax = plt.subplots(1,1, subplot_kw=dict(projection='polar'))
- ax.quiver(lon,lat,var[1],var[0])
- ax.set_rmax(40)
- ax.set_rmin(0)
- #ax.set_theta_direction(-1)
- ax.set_rticks([0, 10, 20, 30, 40])
- ax.set_yticklabels(['90', '80', '70', '60', '50'])
- ax.set_theta_zero_location('N')
- #ax.set_theta_zero_location('S')
- ax.grid(True)
- fig.show()
Add Comment
Please, Sign In to add comment