Skip to content
Snippets Groups Projects
Commit 633ebfd7 authored by tomrink's avatar tomrink
Browse files

minor

parent ee62a446
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ from sklearn.metrics import roc_auc_score, roc_curve
import tensorflow as tf
import matplotlib
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import os
from util.setup import home_dir
......@@ -180,3 +181,19 @@ def plot_image(image, fname, label, cmap='Greys'):
Fig.clf() # Otherwise fig stays open every time
plt.close() # Close current figure
# plt.close('all')
def plot_image2(image, cmap='Greys'):
fig = plt.figure(figsize=(12, 8))
ax = plt.axes(projection=ccrs.PlateCarree())
img_extent = [-180, 180, -90, 90]
ax.imshow(image, origin='lower', extent=img_extent, transform=ccrs.PlateCarree(), cmap=cmap, vmin=-1.5, vmax=2.5)
ax.coastlines(resolution='50m', color='blue', linewidth=1)
# Save to file
ImageDirAndName = os.path.join('/Users/tomrink', 'testimage')
fig.savefig(ImageDirAndName)
# Wrap up
fig.clf() # Otherwise fig stays open every time
plt.close() # Close current figure
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment