Skip to content
Snippets Groups Projects
Unverified Commit a44ecc4c authored by Eleftherios Zisis's avatar Eleftherios Zisis Committed by GitHub
Browse files

Fix mpl.cm.get_cmap deprecation (#1122)

parent 65a3e2e2
No related branches found
No related tags found
No related merge requests found
...@@ -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 = mpl.cm.get_cmap(color_map).copy() colormap = plt.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,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment