I'm having trouble adjusting the pcolormesh graph with a color bar that includes logarithmically spaced small marks on the color bar.
The closest I came, itβs something like this:
import matplotlib import matplotlib.pyplot as plt import numpy as np xbins = np.linspace(0, 1, 50) ybins = np.linspace(0, 1, 50) data = np.random.random((49,49)) fig, ax = plt.subplots() im = ax.pcolormesh(xbins, ybins, data, norm=matplotlib.colors.LogNorm()) cb = fig.colorbar(im) cb.ax.minorticks_on() plt.savefig('test.png')
The problem with this solution is that minor ticks are evenly distributed in the log space:

I would like to adjust the plot so that I have evenly spaced small ticks in linear space that should be displayed unevenly on this section.
I know that I can manually set label tags of a smaller size using FixedFormatter , but I would prefer not to do this if possible, since I will do a lot of charts automatically.
source share