Python: Shifted logarithmic colorbar, white color offset to center
问题 I am struggling to plot my data using pyplot.imshow . I use the 'RdBu_r' colormap, and I need the white color to be at value 1 on a logarithmic scale which is not centered at 1. But how can I do it? I tried 'center=1' which works for seaborn, but there is no such attribute in matplotlib. I also tried this: import matplotlib.pyplot as plt im=plt.imshow(proportion, cmap="RdBu_r", norm=LogNorm(), vmin=0.01, vmax=10) axs=plt.gca() cb = plt.colorbar(im, ax=axs,extend="both") where proportion is my