Closed
Description
Bug summary
The "over value" and the "under value" of colormap are not correctly shown when using ax.invert_yaxis (invert_xaxis if the colorbar is horizontal) function.
Code for reproduction
import numpy as np
import matplotlib.pyplot as plt
im=plt.imshow(np.arange(10000).reshape(100,100),vmax=9000,vmin=1000)
cb=plt.colorbar(im,extend='both')
cb.ax.invert_yaxis()
Actual outcome
Expected outcome
The "over value" and the "under value" could be shown in the right location by the way. The "under value" is expected to be at the top, if the y axis is reverted.
If this is not a bug, would it be a feature?
Additional information
No response
Operating system
CentOs
Matplotlib Version
3.5.0
Matplotlib Backend
No response
Python version
3.9.7
Jupyter version
No response
Installation
No response