Skip to content

Commit

Permalink
Fix mpl.cm.get_cmap deprecation (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
eleftherioszisis committed Apr 30, 2024
1 parent 65a3e2e commit a44ecc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/density_plot.py
Expand Up @@ -70,7 +70,7 @@ def plot_density(population, # pylint: disable=too-many-arguments, too-many-loc
mask = H1 < threshold # mask = H1==0
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)

plots = ax.contourf((xedges1[:-1] + xedges1[1:]) / 2,
Expand Down

0 comments on commit a44ecc4

Please sign in to comment.