You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug summary
In OSX using a Jupyter notebook with Matplotlib 2.0.2 and inline display, subplots apparently render after all the code in a cell has executed. The result is that if an object changes between one subplot plot call and the next, only the newest object is shown in both subplots.
This is fixed in 2.0.2, but I'm posting this issue for folks that might run into this.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotasplt%matplotlibinlineA=np.array([[1,2,3],[4,5,6],[7,8,9]])
B=A.copy()
fig, axes=plt.subplots(1,3)
ax0, ax1, ax2=axesax0.matshow(A)
A[0,0] =9ax1.matshow(B)
ax2.matshow(A)
# Expected behavior - first and second subplots are the same.# Observed behavior - first and third subplots are the same.
Actual outcome
Expected outcome
I would expect the first and second subplots to be the same.
This is a duplicated of #6419 and fixed by #6422 which is in 1.5.2. I suggest you update if possible or just be aware that imshow does not copy it's data so if you mutate it it will be reflected in the output.
Activity
tacaswell commentedon Aug 31, 2017
This is a duplicated of #6419 and fixed by #6422 which is in 1.5.2. I suggest you update if possible or just be aware that imshow does not copy it's data so if you mutate it it will be reflected in the output.
tacaswell commentedon Aug 31, 2017
Thank you for taking the time to report this!
ckemere commentedon Aug 31, 2017
Thanks, and apologies for posting a duplicate.