Skip to content

OSX delayed rendering issue #9133

Closed
Closed

Description

@ckemere

Bug report

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

import numpy as np
import matplotlib.pyplot as plt

%matplotlib inline

A = np.array([[1,2,3],[4,5,6],[7,8,9]])
B = A.copy()
fig, axes = plt.subplots(1,3)
ax0, ax1, ax2 = axes
ax0.matshow(A)
A[0,0] = 9
ax1.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
image

Expected outcome
I would expect the first and second subplots to be the same.

Matplotlib version

  • Operating System: OSX 10.10.5
  • Matplotlib Version: 1.5.1
  • Python Version: 3.5.2
  • Jupyter Version (if applicable): 5.0.0
  • Other Libraries:

Installed from Anaconda 4.3.

Activity

  1. tacaswell commented on Aug 31, 2017

    @tacaswell
    Member

    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.

  2. tacaswell commented on Aug 31, 2017

    @tacaswell
    Member

    Thank you for taking the time to report this!

  3. ckemere commented on Aug 31, 2017

    @ckemere
    Author

    Thanks, and apologies for posting a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions