Skip to content
Snippets Groups Projects
Commit 44c61a7a authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 54955f73
Branches
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sklearn.metrics import roc_auc_score, roc_curve
import tensorflow as tf
import matplotlib
......@@ -317,6 +313,34 @@ def make_icing_image(h5f, probs, ice_lons, ice_lats, clvrx_str_time, satellite,
fig.savefig(ImageDirAndName)
def plot_grid2d(grid_2d, x_map_2d, y_map_2d, proj, vmin=None, vmax=None, cmap='jet'):
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(1, 1, 1, projection=proj)
# Save mappable object returned by pcolormesh
p = ax.pcolormesh(x_map_2d, y_map_2d, grid_2d, vmin=270.0, vmax=310.0, cmap='jet', shading='auto')
ax.coastlines(resolution='50m', color='green', linewidth=1.50)
# Add gridlines for longitudes and latitudes
gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True,
linewidth=2, color='gray', alpha=0.5, linestyle='--')
gl.xlabels_top = gl.ylabels_right = False
gl.ylabel_style = {'rotation': 90}
gl.ylabel_padding = 15
# Add color bar
cbar = plt.colorbar(p, orientation="horizontal", pad=0.05)
cbar.set_label('Value', size=15) # Set color bar label
plt.show()
# plt.close()
# values, edges in Epoch time
def make_time_domain_hist(values, edges):
# convert the epoch format to matplotlib date format
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment