Thanks to visit codestin.com
Credit goes to github.com

Skip to content

imshow does not immediately update shared axes #6922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
efiring opened this issue Aug 8, 2016 · 6 comments
Closed

imshow does not immediately update shared axes #6922

efiring opened this issue Aug 8, 2016 · 6 comments

Comments

@efiring
Copy link
Member

efiring commented Aug 8, 2016

On master:

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax1 = fig.add_axes([0.1, 0.1, 0.2, 0.2])
ax2 = fig.add_axes([0.35, 0.35, 0.6, 0.6], sharex=ax1, sharey=ax1)
ax3 = fig.add_axes([0.1, 0.35, 0.2, 0.6], sharex=ax1, sharey=ax1)
ax1.plot([1, 10])
ax2.plot([2, 20])
# ax3.plot([3, 30])
ax3.imshow(np.random.randn(10, 10))

plt.show()

The two axes with the lines do not react to the changed xlim and ylim from the imshow call until one forces a redraw, such as by resizing the window or using a zoom tool.
This problem turned up in #6759.

@jenshnielsen
Copy link
Member

Does it apply to 2.x too?

@efiring
Copy link
Member Author

efiring commented Aug 8, 2016

On 2016/08/07 9:01 PM, Jens Hedegaard Nielsen wrote:

Does it apply to 2.x too?

Yes, I checked just now with the latest 2.x and the result is the same.

@jenshnielsen jenshnielsen added this to the 2.0 (style change major release) milestone Aug 8, 2016
@efiring
Copy link
Member Author

efiring commented Aug 8, 2016

Possibly related to #6890.

@efiring
Copy link
Member Author

efiring commented Aug 8, 2016

Unfortunately, applying #6890, at least in its present form, does not solve the problem.

@efiring
Copy link
Member Author

efiring commented Aug 8, 2016

The behavior is the same in mpl 1.5.1, so it is not a regression. I don't consider it a blocker. I'm going to shift the milestone.

@efiring efiring modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Aug 8, 2016
@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017
@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017
@dstansby
Copy link
Member

This looks fixed on master to me; feel free to re-open if it's still a problem.

@story645 story645 removed this from the future releases milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants