Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
9bfed733
Commit
9bfed733
authored
1 year ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
6ea461f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/util/plot.py
+16
-7
16 additions, 7 deletions
modules/util/plot.py
with
16 additions
and
7 deletions
modules/util/plot.py
+
16
−
7
View file @
9bfed733
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment