Skip to content
Snippets Groups Projects
Commit 9bfed733 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 6ea461f2
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""
Created on Wed May 22 13:58:09 2019
@author: Wimmers
"""
from sklearn.metrics import roc_auc_score, roc_curve from sklearn.metrics import roc_auc_score, roc_curve
import tensorflow as tf import tensorflow as tf
...@@ -18,6 +14,7 @@ import h5py ...@@ -18,6 +14,7 @@ import h5py
from util.util import get_grid_values_all, get_cartopy_crs, homedir from util.util import get_grid_values_all, get_cartopy_crs, homedir
from util.setup import home_dir from util.setup import home_dir
import mpl_scatter_density
logdir = home_dir+'/tf_logs' logdir = home_dir+'/tf_logs'
root_imgdir = home_dir root_imgdir = home_dir
...@@ -289,7 +286,19 @@ def make_time_domain_hist(values, edges): ...@@ -289,7 +286,19 @@ def make_time_domain_hist(values, edges):
fig, ax = plt.subplots(1, 1) fig, ax = plt.subplots(1, 1)
ax.hist(values, bins=edges, ec='black') ax.hist(values, bins=edges, ec='black')
#ax.xaxis.set_major_locator(mdates.MonthLocator()) # ax.xaxis.set_major_locator(mdates.MonthLocator())
#ax.xaxis.set_major_formatter(mdates.DateFormatter('%y-%m-%d_%h')) # ax.xaxis.set_major_formatter(mdates.DateFormatter('%y-%m-%d_%h'))
#fig.autofmt_xdate() # fig.autofmt_xdate()
plt.show() plt.show()
def scatter_density(x, y, color, fname=None, fig=None):
if fig is None:
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection='scatter_density')
ax.scatter_density(x, y, color=color)
if fname is not None:
fig.savefig(fname)
return fig
\ 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