我使用Seaborn绘制热图。热图的值是1到10的10个整数,因此颜色条按顺序有10种颜色。使用以下代码,颜色条上的刻度不在每种颜色的中间。我怎样才能找到蜱?感谢
plt.figure(figsize = (1000,1000),dpi = 2.56)
grid_kws = {"height_ratios": (.9, .05), "hspace": .3}
b, (ax, cbar_ax) = plt.subplots(2,figsize=(15, 15),gridspec_kw=grid_kws)
a = sns.heatmap(data_frame,annot = True,square = True,cmap =color_code, vmin= v_min,vmax = v_max,fmt ="",ax = ax, cbar_ax = cbar_ax, cbar_kws = {'orientation':'horizontal','ticks':[1,2,3,4,5,6,7,8,9,10]},annot_kws ={"size": annot_kws_size})