Guest User

Untitled

a guest
Nov 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4. x = np.arange(50,91,2)
  5. y = np.arange(-180,181,15)
  6. Y, X = np.meshgrid(y,x)
  7. var = np.random.rand(2,len(x),len(y))
  8.  
  9. lat = (X - 90) *-1
  10. lon = (Y)*np.pi/180
  11.  
  12. fig, ax = plt.subplots(1,1, subplot_kw=dict(projection='polar'))
  13. ax.quiver(lon,lat,var[1],var[0])
  14. ax.set_rmax(40)
  15. ax.set_rmin(0)
  16. #ax.set_theta_direction(-1)
  17. ax.set_rticks([0, 10, 20, 30, 40])
  18. ax.set_yticklabels(['90', '80', '70', '60', '50'])
  19. ax.set_theta_zero_location('N')
  20. #ax.set_theta_zero_location('S')
  21. ax.grid(True)
  22. fig.show()
Add Comment
Please, Sign In to add comment