Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NeuroM
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BlueBrain
NeuroM
Commits
a44ecc4c
Unverified
Commit
a44ecc4c
authored
1 year ago
by
Eleftherios Zisis
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix mpl.cm.get_cmap deprecation (#1122)
parent
65a3e2e2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/density_plot.py
+1
-1
1 addition, 1 deletion
examples/density_plot.py
with
1 addition
and
1 deletion
examples/density_plot.py
+
1
−
1
View file @
a44ecc4c
...
@@ -70,7 +70,7 @@ def plot_density(population, # pylint: disable=too-many-arguments, too-many-loc
...
@@ -70,7 +70,7 @@ def plot_density(population, # pylint: disable=too-many-arguments, too-many-loc
mask
=
H1
<
threshold
# mask = H1==0
mask
=
H1
<
threshold
# mask = H1==0
H2
=
np
.
ma
.
masked_array
(
H1
,
mask
)
H2
=
np
.
ma
.
masked_array
(
H1
,
mask
)
colormap
=
m
pl
.
cm
.
get_cmap
(
color_map
).
copy
()
colormap
=
pl
t
.
get_cmap
(
color_map
).
copy
()
colormap
.
set_bad
(
color
=
'
white
'
,
alpha
=
None
)
colormap
.
set_bad
(
color
=
'
white
'
,
alpha
=
None
)
plots
=
ax
.
contourf
((
xedges1
[:
-
1
]
+
xedges1
[
1
:])
/
2
,
plots
=
ax
.
contourf
((
xedges1
[:
-
1
]
+
xedges1
[
1
:])
/
2
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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