Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug report
When animating a 2D plot with a colorbar, updating the color limits in each iteration changes the size of the colorbar. This issue did not exist with matplotlib 2.2.3.
importnumpyasnpimportmatplotlib.pyplotaspltfromscipy.ndimageimportlaplacedefmain():time=np.arange(0,1,0.01)c=np.zeros(shape=(11,11))c[5,5]=1fig=plt.figure()ax=fig.gca()im=ax.imshow(c)fig.colorbar(im)fortintime:c+=laplace(c)/10im.set_data(c)im.set_clim(0,np.max(c))plt.pause(0.001)plt.show()if__name__=="__main__":main()
Matplotlib version
- Operating system: windows 7
- Matplotlib version: 3.0.0
- Matplotlib backend (
print(matplotlib.get_backend())
): TkAgg - Python version: 3.7
Python was installed using the latest Anaconda distribution.