python - Seaborn: how to plot wind speed v direction on circular plot? -


using seaborn 0.6.0 if have pandas df looks (only longer):

windspeed  windbearing 15.37          165 17.49          161 16.41          154 15.54          164 17.38          162 17.80            0 17.36          181 17.35          181 15.96          175 15.86          157  

how can plot windbearing circular grid, representing compass direction , windspeed rays emanating center speed represented length of ray?

as mwaskom says in comments, straight matplotlib, not seaborn. this:

import pandas pd matplotlib import pyplot plt math import radians  ax = plt.subplot(111, polar=true) ax.scatter(x=[radians(x) x in df['windbearing'].values], y=df['windspeed'].values) ax.set_theta_zero_location('n') ax.set_theta_direction(-1) 

yields chart:

enter image description here

as usual, importing seaborn beforehand make chart more attractive; same code yield:

enter image description here


Comments