diff --git a/encoder/inference.py b/encoder/inference.py index d769dd172bc97a4f9e96db0e2a12ca97f895ad30..4ca417b63406b9280418069d28d2877308be9bc2 100644 --- a/encoder/inference.py +++ b/encoder/inference.py @@ -171,7 +171,8 @@ def plot_embedding_as_heatmap(embed, ax=None, title="", shape=None, color_range= cmap = cm.get_cmap() mappable = ax.imshow(embed, cmap=cmap) cbar = plt.colorbar(mappable, ax=ax, fraction=0.046, pad=0.04) - cbar.set_clim(*color_range) + sm = cm.ScalarMappable(cmap=cmap) + sm.set_clim(*color_range) ax.set_xticks([]), ax.set_yticks([]) ax.set_title(title) diff --git a/requirements.txt b/requirements.txt index 1a2ea96558d4449a38ea75dc10e2a7d8d13690db..516ce40784efe1bb8288ad2e2a5fefa1dfef5758 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ tensorflow==1.15 umap-learn visdom librosa>=0.8.0 -matplotlib>=2.0.2 +matplotlib>=3.3.0 numpy>=1.14.0 scipy>=1.0.0 tqdm