Python热图:集中值和y轴

时间:2020-06-23 17:16:11

标签: python seaborn heatmap

使用seaborn的热图,我想将两者集中化:图表上的值和y轴值。非常感谢您提供任何提示。

import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

test=np.matrix('10000 20000;30000 40000')

df_cm = pd.DataFrame(test, index = [i for i in "01"], columns = [i for i in "01"])
plt.figure(figsize = (5,3))
cf_heatmap=sns.heatmap(test, annot=True, fmt='n', annot_kws={"size":12}, linewidths=.5, vmin=0,vmax=50000, center=False, cmap='RdBu_r').set(title='TITLE')
plt.ylabel('fff')
plt.xlabel('yyy')

0 个答案:

没有答案
相关问题