numpy - How to input both wind speed and direction data and pcolormesh plot it in python, with both on the same plot? -


i have wind speed , direction data need plot python. got data data file , did calculations wind speed , data, , here got:

wind_speed = np.sqrt(u**2+ v**2) wind_speed wind_dir_trig_to = (np.arctan2((u/wind_speed), (v/wind_speed))) wind_dir_trig_to_degrees = (wind_dir_trig_to * (180/np.pi)) wind_dir_trig_from_degrees = wind_dir_trig_to_degrees + 180   wind_dir_trig_from_degrees wind_dir_cardinal = 90 - wind_dir_trig_from_degrees wind_dir_cardinal 

this output of code shown above:

array([[ 25.05589294,  26.44908142,  25.87358856, ...,  26.09784698,      24.73834229,  23.79068756],    [ 25.00778198,  26.04024506,  25.52288055, ...,  24.56259918,      22.53238678,  21.8249054 ],    [ 23.54372406,  23.90814972,  24.1379776 , ...,  24.2286377 ,      22.26264191,  21.62586975],    ...,     [ 26.37328339,  27.58541107,  27.02276611, ...,  22.10659027,      22.27283478,  23.06639862],    [ 26.5234375 ,  26.64894867,  25.70041656, ...,  24.78749084,      24.94545746,  25.05831909],    [ 25.57256317,  24.58295441,  23.94006348, ...,  27.29759979,      27.22042084,  26.55405426]], dtype=float32) 

how use data plot both wind speed , direction same pcolormesh graph in python?

how about:

import matplotlib.pyplot pl pl.pcolormesh(wind_dir_cardinal)