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
With the the current matplotlib version 1.4.3 using python 3.4.1 from Anaconda on Windows 7 I tried using the new nbagg backend.
The test code is
import numpy as np
import matplotlib
matplotlib.use('nbagg')
from matplotlib import pyplot as plt
x = np.linspace(0, 4, 100)
f = lambda x: x**2 + np.cos(5*x)
plt.plot(x, f(x))
plt.show()
This gives me a plot with the interactive controls from the nbagg backend. Now I can use the pan tool and move the axis a little bit. This works 3-4 times, after than the pan tool stops work, similarly the zoom tool. The download button is the only one working, all other functions cease to run.
No, there is no message on the ipython console. Restarting the current kernel and running all cells again does not help either.
I can pan a bit again after reloading the page though.
Just to test if this is any different with a newer IPython version I installed the current github IPython/Jupyter 3.0 development version and can still reproduce the issue.
After a bit of digging, it appears that the problem is related to fig.waiting being stuck to true, and not getting unset by an apparently expected image.onload event that doesn't come. I think the cause is that image.onload doesn't fire when you set the image data if the value hasn't actually changed (example notebook).
I think moving the waiting = false to something that always fires should fix the issue that I'm seeing, at least.
#4171 moves the assignment of waiting = false so that it should always be set on every change, instead of onload. I'm not sure, but it might also make sense to force waiting = false when receiving a draw message on the javascript side. Right now, when the kernel sends a draw message and the frontend has waiting = true, the frontend does not send the draw message back to the kernel. This may be the intended behavior, but if not, it would be a good way of ensuring that an inappropriately sticky waiting = true is easy to unstick.
Activity
mdboom commentedon Feb 26, 2015
Is there any output from the console?
asteppke commentedon Feb 26, 2015
No, there is no message on the ipython console. Restarting the current kernel and running all cells again does not help either.
I can pan a bit again after reloading the page though.
tacaswell commentedon Feb 26, 2015
What browser?
I have seen issues with clicking too fast and something gets out of sync with the comms.
asteppke commentedon Feb 26, 2015
I see this issue in the current version of Chrome (40.0.2214.115 m). On Internet Explorer 11 I cannot reproduce the problem here.
tacaswell commentedon Feb 26, 2015
attn @minrk who on the IPython side should we ping about this sort of thing?
asteppke commentedon Feb 26, 2015
Just to test if this is any different with a newer IPython version I installed the current github IPython/Jupyter 3.0 development version and can still reproduce the issue.
minrk commentedon Feb 26, 2015
@tacaswell pinging me is fine.
After a bit of digging, it appears that the problem is related to
fig.waitingbeing stuck totrue, and not getting unset by an apparently expectedimage.onloadevent that doesn't come. I think the cause is thatimage.onloaddoesn't fire when you set the image data if the value hasn't actually changed (example notebook).I think moving the
waiting = falseto something that always fires should fix the issue that I'm seeing, at least.minrk commentedon Feb 26, 2015
#4171 moves the assignment of
waiting = falseso that it should always be set on every change, instead of onload. I'm not sure, but it might also make sense to forcewaiting = falsewhen receiving a draw message on the javascript side. Right now, when the kernel sends a draw message and the frontend haswaiting = true, the frontend does not send thedrawmessage back to the kernel. This may be the intended behavior, but if not, it would be a good way of ensuring that an inappropriately stickywaiting = trueis easy to unstick.