我试图用海运在热图中绘制离散值。下面是我想要策划的清单:
xa = [[5, 4, 4, 4, 13, 4, 4],
[1, 9, 4, 3, 9, 1, 4],
[4, 1, 7, 1, 5, 3, 7],
[1, 9, 4, 3, 9, 5, 4],
[2, 1, 4, 1, 9, 4, 3],
[9, 4, 8, 1, 7, 1, 9],
[4, 8, 1, 7, 1, 4, 8]]
下面是我用来绘制热图的代码:
import numpy as np
import seaborn as sns
from matplotlib.colors import ListedColor