From b0718e2536896e2796d7dc22017c6a6c052c2fb4 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Fri, 10 Sep 2021 13:14:12 -0500 Subject: [PATCH] snapshot... --- modules/util/plot.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/util/plot.py b/modules/util/plot.py index 2a72fbb2..4f9bb64f 100644 --- a/modules/util/plot.py +++ b/modules/util/plot.py @@ -224,7 +224,7 @@ def plot_image3(image, cmap='Greys'): plt.title('GOES-16', loc='left', fontweight='bold', fontsize=15) -def make_icing_image(clvrx_file, ice_lons, ice_lats, ice_lons_vld=None, ice_lats_vld=None, filename='testimage'): +def make_icing_image(clvrx_file, ice_lons, ice_lats, ice_lons_vld=None, ice_lats_vld=None, filename='testimage', title=None): h5f = h5py.File(clvrx_file, 'r') image = get_grid_values_all(h5f, 'temp_10_4um_nom') @@ -236,13 +236,16 @@ def make_icing_image(clvrx_file, ice_lons, ice_lats, ice_lons_vld=None, ice_lats fig = plt.figure(figsize=(48, 30)) ax = fig.add_subplot(1, 1, 1, projection=geos) + ax.set_extent([-110, -60, 10, 55], crs=ccrs.PlateCarree()) ax.imshow(image, origin='upper', extent=(x.min(), x.max(), y.min(), y.max()), cmap='Greys', transform=geos) ax.coastlines(resolution='50m', color='black', linewidth=0.25) ax.add_feature(ccrs.cartopy.feature.STATES, linewidth=0.25) - ax.scatter(ice_lons, ice_lats, s=10.0, marker='o', color='blue', transform=ccrs.PlateCarree()) + if ice_lons is not None: + ax.scatter(ice_lons, ice_lats, s=40.0, marker='o', color='blue', transform=ccrs.PlateCarree()) if ice_lats_vld is not None: - ax.scatter(ice_lons_vld, ice_lats_vld, s=20.0, facecolors='none', marker='o', edgecolor='red', transform=ccrs.PlateCarree()) - plt.title('GOES-16, 2019-09-09_17:26Z >60% Probability Icing', loc='left', fontweight='bold', fontsize=15) + #ax.scatter(ice_lons_vld, ice_lats_vld, s=140.0, facecolors='none', marker='o', edgecolor='red', transform=ccrs.PlateCarree()) + ax.scatter(ice_lons_vld, ice_lats_vld, s=140.0, marker='o', color='red', transform=ccrs.PlateCarree()) + plt.title(title, loc='left', fontweight='bold', fontsize=24) ImageDirAndName = os.path.join('/Users/tomrink', filename) fig.savefig(ImageDirAndName) -- GitLab