Closed
Description
As reported at astropy by @dstansby: (astropy/astropy#11800) colorbars with norms that do not have a scale associated with them are not being ticked properly.
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.colors as mcolors
fig, ax = plt.subplots()
pc = ax.imshow(np.arange(100).reshape(10, 10), norm=mcolors.TwoSlopeNorm(20, 0, 100), cmap='RdBu_r')
cb = fig.colorbar(pc, extend='both')
plt.show()