Skip to content

nbagg backend stops working #4168

Closed

Description

@asteppke

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.

Activity

  1. mdboom commented on Feb 26, 2015

    @mdboom
    Member

    Is there any output from the console?

  2. asteppke commented on Feb 26, 2015

    @asteppke
    Author

    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.

  3. tacaswell commented on Feb 26, 2015

    @tacaswell
    Member

    What browser?

    I have seen issues with clicking too fast and something gets out of sync with the comms.

  4. added this to the milestone on Feb 26, 2015
  5. asteppke commented on Feb 26, 2015

    @asteppke
    Author

    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.

  6. tacaswell commented on Feb 26, 2015

    @tacaswell
    Member

    attn @minrk who on the IPython side should we ping about this sort of thing?

  7. asteppke commented on Feb 26, 2015

    @asteppke
    Author

    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.

  8. minrk commented on Feb 26, 2015

    @minrk
    Contributor

    @tacaswell pinging me is fine.

    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.

  9. minrk commented on Feb 26, 2015

    @minrk
    Contributor

    #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.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions