未验证 提交 47a9093f 编写于 作者: B blue-fish 提交者: GitHub

Matplotlib colorbar update (#573)

上级 049b0ab0
......@@ -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)
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册