def plot_heatmap(mpm, cm=plt.cm.viridis, xlabel='Sources', ylabel='Sinks',
title='Mixing Proportions (as Fraction)'):
'''Make a basic mixing proportion histogram.'''
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
sns.heatmap(mpm, vmin=0, vmax=1.0, cmap=cm, annot=True, linewidths=.5,
ax=ax)
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.set_title(title)
return fig, ax
评论列表
文章目录