Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- filename = 'Random_Events_All_Sorted_85GHz.csv'
- df = pd.read_csv(filename)
- min37 = df.min37
- min85 = df.min85
- verification = df.five_min_1
- #Numbers
- x = min85
- y = min37
- H = verification
- #Estimate the 2D histogram
- nbins = 4
- H, xedges, yedges = np.histogram2d(x,y,bins=nbins)
- #Rotate and flip H
- H = np.rot90(H)
- H = np.flipud(H)
- #Mask zeros
- Hmasked = np.ma.masked_where(H==0,H)
- #Plot 2D histogram using pcolor
- fig1 = plt.figure()
- plt.pcolormesh(xedges,yedges,Hmasked)
- plt.xlabel('min 85 GHz PCT (K)')
- plt.ylabel('min 37 GHz PCT (K)')
- cbar = plt.colorbar()
- cbar.ax.set_ylabel('Probability of Lightning (%)')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement