Skip to content

Commit

Permalink
update matplotlib colormaps access
Browse files Browse the repository at this point in the history
  • Loading branch information
James Wood authored and James Wood committed Jun 11, 2024
1 parent 81cb560 commit 32e48f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions podaac/tig/tig.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import logging
import json
import matplotlib.colors as col
import matplotlib.cm as cm
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import numpy.ma as ma
Expand Down Expand Up @@ -842,12 +842,12 @@ def load_json_palette(palette_dir, palette_name, alpha):

cmap = col.ListedColormap(colors, palette_name)
try:
cm.register_cmap(cmap=cmap)
matplotlib.colormaps.register(cmap=cmap)
except ValueError:
# palette register via other images
pass

return cm.get_cmap(palette_name)
return matplotlib.colormaps[palette_name]


def vals_to_rgba(vals, min_val, max_val, colormap, transparency=True, no_data=None):
Expand Down

0 comments on commit 32e48f6

Please sign in to comment.