How to display ticks in plain number for seaborn heatmap with logarithmic scale?
问题 I am generating a heatmap using seaborn which has a logarithmic scale. How can I change the colorbar labels from scientific notation to plain number. import math from matplotlib.colors import LogNorm vmax=2 vmin=0.5 center = (vmax+vmin)/2 log_norm = LogNorm(vmin=vmin, vmax=vmin) cbar_ticks = [0.5, 0.66, 1, 1.5, 2] ax = sns.heatmap(corr, square=True, mask=mask, cmap=cmap_type, linewidths=.5, vmax=vmax, vmin=vmin, norm=log_norm, cbar_kws={"ticks": cbar_ticks}, center=center) Edit: The following