Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Milestone
Description
Problem
We broke this in 3.5.0, but in 3.4.3
import matplotlib.pyplot as pltimport numpy as npimport matplotlib as mplfig, ax = plt.subplots()pc = ax.imshow(np.random.randn(10, 10), cmap='RdBu_r')cb = fig.colorbar(pc, ax=ax, boundaries=np.linspace(-4, 4, 5))plt.show()
would do:
I'm not a fan of us enabling digitizing the colorbardifferently than the data. If someone wants boundaries, they should be doing them with a BoundaryNorm:
fig,ax=plt.subplots()norm=mpl.colors.BoundaryNorm(np.linspace(-4,4,5),256)pc=ax.imshow(X,cmap='RdBu_r',norm=norm)cb=fig.colorbar(pc,ax=ax)
Proposed solution
deprecate the boundaries kwarg....