Skip to content

Commit

Permalink
Merge pull request #161 from zmoon/cmap-depr
Browse files Browse the repository at this point in the history
Address other mpl cmap deprecation cases
  • Loading branch information
zmoon authored Feb 28, 2023
2 parents e578a4c + 0041f05 commit 5e9e6f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions melodies_monet/plots/surfplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def new_color_map():
Orange and blue color map
"""
top = mpl.cm.get_cmap("Blues_r", 128)
bottom = mpl.cm.get_cmap("Oranges", 128)
top = plt.get_cmap("Blues_r", 128)
bottom = plt.get_cmap("Oranges", 128)

newcolors = np.vstack((top(np.linspace(0, 1, 128)),
bottom(np.linspace(0, 1, 128))))
Expand Down Expand Up @@ -710,7 +710,7 @@ def make_spatial_overlay(df, vmodel, column_o=None, label_o=None, column_m=None,
nlevels = 21

clevel = np.linspace(vmin,vmax,nlevels)
cmap = mpl.cm.get_cmap('Spectral_r',nlevels-1)
cmap = plt.get_cmap('Spectral_r',nlevels-1)
norm = mpl.colors.BoundaryNorm(clevel, ncolors=cmap.N, clip=False)

# For unstructured grid, we need a more advanced plotting code
Expand Down

0 comments on commit 5e9e6f6

Please sign in to comment.